kernel-ark/drivers
Lin Ming 932df74143 ACPI: processor: fix processor_physically_present in UP kernel
Usually, there are multiple processors defined in ACPI table, for
example

    Scope (_PR)
    {
        Processor (CPU0, 0x00, 0x00000410, 0x06) {}
        Processor (CPU1, 0x01, 0x00000410, 0x06) {}
        Processor (CPU2, 0x02, 0x00000410, 0x06) {}
        Processor (CPU3, 0x03, 0x00000410, 0x06) {}
    }

processor_physically_present(...) will be called to check whether those
processors are physically present.

Currently we have below codes in processor_physically_present,

cpuid = acpi_get_cpuid(...);
if ((cpuid == -1) && (num_possible_cpus() > 1))
        return false;
return true;

In UP kernel, acpi_get_cpuid(...) always return -1 and
num_possible_cpus() always return 1, so
processor_physically_present(...) always returns true for all passed in
processor handles.

This is wrong for UP processor or SMP processor running UP kernel.

This patch removes the !SMP version of acpi_get_cpuid(), so both UP and
SMP kernel use the same acpi_get_cpuid function.

And for UP kernel, only processor 0 is valid.

https://bugzilla.kernel.org/show_bug.cgi?id=16548
https://bugzilla.kernel.org/show_bug.cgi?id=16357

Tested-by: Anton Kochkov <anton.kochkov@gmail.com>
Tested-by: Ambroz Bizjak <ambrop7@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2011-05-29 02:17:56 -04:00
..
accessibility
acpi ACPI: processor: fix processor_physically_present in UP kernel 2011-05-29 02:17:56 -04:00
amba
ata Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2011-05-14 12:19:18 -07:00
atm drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
auxdisplay
base
block Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2011-05-18 06:49:02 -07:00
bluetooth
cdrom cdrom: always check_disk_change() on open 2011-04-29 10:17:25 +02:00
char drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
clk CLKDEV: Fix clkdev return value for NULL clk case 2011-04-30 10:14:08 +01:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
eisa
firewire Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2011-05-04 14:21:39 -07:00
firmware
gpio
gpu drm: Take lock around probes for drm_fb_helper_hotplug_event 2011-05-16 12:01:43 +10:00
hid
hwmon hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails 2011-05-01 09:06:35 -07:00
hwspinlock
i2c drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
ide
idle
ieee802154
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-05-12 10:41:31 -07:00
isdn
leds drivers/leds/leds-lm3530.c: add MODULE_DEVICE_TABLE 2011-05-18 02:55:22 -07:00
lguest
macintosh
mca
md
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-05-18 03:16:38 -07:00
memstick
message
mfd mfd: Fix for the TWL4030 PM sleep/wakeup sequence 2011-05-11 11:09:58 +02:00
misc
mmc drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
mtd drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
net drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
nfc
nubus
of
oprofile
parisc
parport
pci PCI: Clear bridge resource flags if requested size is 0 2011-05-16 18:33:35 -07:00
pcmcia
platform eeepc-laptop: Use ACPI handle to identify rfkill port 2011-05-09 10:48:47 -04:00
pnp
power
pps
ps3
rapidio rapidio: fix default routing initialization 2011-05-18 02:55:22 -07:00
regulator
rtc Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-17 08:02:04 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2011-05-18 06:49:02 -07:00
sbus
scsi Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6 2011-05-18 13:25:57 -07:00
sfi
sh
sn
spi
ssb
staging Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 2011-05-04 14:23:41 -07:00
target
tc
telephony
thermal
tty drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
uio
usb drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
uwb
vhost
video Merge branch 'fbmem' 2011-05-14 11:24:32 -07:00
virtio
vlynq
w1
watchdog drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
xen
zorro
Kconfig
Makefile