aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched_cpupri.h
diff options
context:
space:
mode:
authorGregory Haskins <ghaskins@novell.com>2008-06-04 15:04:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-06 15:19:43 +0200
commit709d4b0c60f990bccf3e10ba7c6da407ad65c97f (patch)
tree1d8c931a068f0957d52dc5cae75c7013138caa50 /kernel/sched_cpupri.h
parent1f11eb6a8bc92536d9e93ead48fa3ffbd1478571 (diff)
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 <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>
Diffstat (limited to 'kernel/sched_cpupri.h')
-rw-r--r--kernel/sched_cpupri.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_cpupri.h b/kernel/sched_cpupri.h
index 0b6a3d110fa..6b38355e267 100644
--- a/kernel/sched_cpupri.h
+++ b/kernel/sched_cpupri.h
@@ -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