Prev: [194/205] ecryptfs: Bugfix for error related to ecryptfs_hash_buckets
Next: [127/205] usb: musb: Fix a bug by making suspend interrupt available in device mode
From: Greg KH on 30 Jul 2010 14:10 2.6.34-stable review patch. If anyone has any objections, please let us know. ------------------ From: Alex Chiang <achiang(a)canonical.com> commit 856b185dd23da39e562983fbf28860f54e661b41 upstream. The commit 5d554a7bb06 (ACPI: processor: add internal processor_physically_present()) is broken on uniprocessor (UP) configurations, as acpi_get_cpuid() will always return -1. We use the value of num_possible_cpus() to tell us whether we got an invalid cpuid from acpi_get_cpuid() in the SMP case, or if instead, we are UP, in which case num_possible_cpus() is #defined as 1. We use num_possible_cpus() instead of num_online_cpus() to protect ourselves against the scenario of CPU hotplug, and we've taken down all the CPUs except one. Thanks to Jan Pogadl for initial report and analysis and Chen Gong for review. https://bugzilla.kernel.org/show_bug.cgi?id=16357 Reported-by: Jan Pogadl <pogadl.jan(a)googlemail.com>: Reviewed-by: Chen Gong <gong.chen(a)linux.intel.com> Signed-off-by: Alex Chiang <achiang(a)canonical.com> Signed-off-by: Len Brown <len.brown(a)intel.com> Cc: Thomas Renninger <trenn(a)suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- drivers/acpi/processor_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -223,7 +223,7 @@ static bool processor_physically_present type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; cpuid = acpi_get_cpuid(handle, type, acpi_id); - if (cpuid == -1) + if ((cpuid == -1) && (num_possible_cpus() > 1)) return false; return true; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |