diff options
author | Gregory Haskins <ghaskins@novell.com> | 2008-06-04 15:04:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-06 15:19:43 +0200 |
commit | 709d4b0c60f990bccf3e10ba7c6da407ad65c97f (patch) | |
tree | 1d8c931a068f0957d52dc5cae75c7013138caa50 /kernel | |
parent | 1f11eb6a8bc92536d9e93ead48fa3ffbd1478571 (diff) | |
download | linux-709d4b0c60f990bccf3e10ba7c6da407ad65c97f.tar.gz linux-709d4b0c60f990bccf3e10ba7c6da407ad65c97f.tar.bz2 linux-709d4b0c60f990bccf3e10ba7c6da407ad65c97f.zip |
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')
-rw-r--r-- | kernel/sched_cpupri.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_cpupri.h b/kernel/sched_cpupri.h index 0b6a3d110fac..6b38355e2676 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 |