Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8387c1a46376b8cfc5f4751b27a6c90f930992cf Commit: 8387c1a46376b8cfc5f4751b27a6c90f930992cf Parent: a2b7d2e97edcad0e95ae0d3c253d3f2f69254fa4 Author: Linus Torvalds <[EMAIL PROTECTED]> AuthorDate: Thu May 31 07:55:16 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Thu May 31 07:55:16 2007 -0700
smpboot: fix cachesize comparison in smp_tune_scheduling() Jarek Poplawski noted that boot_cpu_data.x86_cache_size is signed int and can be < 0 too. In fact we test for it. Except we assigned it to an unsigned value.. Cc: Jarek Poplawski <[EMAIL PROTECTED]> Cc: Ingo Molnar <[EMAIL PROTECTED]> Cc: Nick Piggin <[EMAIL PROTECTED]> Cc: Andi Kleen <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/i386/kernel/smpboot.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 08f07a7..88baed1 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -943,10 +943,9 @@ exit: static void smp_tune_scheduling(void) { - unsigned long cachesize; /* kB */ - if (cpu_khz) { - cachesize = boot_cpu_data.x86_cache_size; + /* cache size in kB */ + long cachesize = boot_cpu_data.x86_cache_size; if (cachesize > 0) max_cache_size = cachesize * 1024; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html