Distribution: Hardware Environment: Software Environment: Problem Description: Current cpu_index calculation in processor_core.c can handle CPUs with id < 255. It can also result in compilation warning when NR_CPUS is greater than 256. The patch fixes it. Steps to reproduce:
Created attachment 5766 [details] Patch that fixes the processor_core warning when NR_CPUS > 256
Please email me the match by the normal means: http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt and copy linux-kernel. Thanks.
the acpi patch has Lindented acpi/processor_core.c, so this patch will no longer apply. Can you supply a patch formatted on top of the acpi patch?
Created attachment 5823 [details] Patch to apply on post-lindent'd processor_core.c
applied
un-applied & re-opened processor module didn't load/unload properly with this patch, it created a build warning for CONFIG_SMP, and created a build failure for !CONFIG_SMP.
*** Bug 5190 has been marked as a duplicate of this bug. ***
Len, Can you post the config where you saw SMP compilation warning? I have fixed the UP case, but I am not seeing any warning fro some reason and module load/unload works fine. Thanks, Venki
This part of the patch should be removed, IMHO. - if (cpu_index >= NR_CPUS) { + if (retval) {
This bug is fixed in latest kernel. Closing the bugzilla. Please reopen if there is issue still.