]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: fix cpupri priocount
authorGregory Haskins <ghaskins@novell.com>
Wed, 4 Jun 2008 19:04:10 +0000 (15:04 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 6 Jun 2008 13:19:43 +0000 (15:19 +0200)
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 <ghaskins@novell.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched_cpupri.h

index 0b6a3d110fac38104f07574924b18d73731d7412..6b38355e267627402cdf9b4a712a1dc0ed4ca3fd 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/sched.h>
 
 #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