From: Gregory Haskins Date: Wed, 4 Jun 2008 19:04:10 +0000 (-0400) Subject: sched: fix cpupri priocount X-Git-Tag: v2.6.27-rc1~1105^2~62 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=709d4b0c60f990bccf3e10ba7c6da407ad65c97f;p=linux-2.6 sched: fix cpupri priocount A rounding error was pointed out by Peter Zijlstra which would result in the structure holding priorities to be off by one. Signed-off-by: Gregory Haskins Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Arnaldo Carvalho de Melo Signed-off-by: Thomas Gleixner --- diff --git a/kernel/sched_cpupri.h b/kernel/sched_cpupri.h index 0b6a3d110f..6b38355e26 100644 --- a/kernel/sched_cpupri.h +++ b/kernel/sched_cpupri.h @@ -4,7 +4,7 @@ #include #define CPUPRI_NR_PRIORITIES 2+MAX_RT_PRIO -#define CPUPRI_NR_PRI_WORDS CPUPRI_NR_PRIORITIES/BITS_PER_LONG +#define CPUPRI_NR_PRI_WORDS (CPUPRI_NR_PRIORITIES + BITS_PER_LONG/2)/BITS_PER_LONG #define CPUPRI_INVALID -1 #define CPUPRI_IDLE 0