linux/include/acpi
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
..
platform ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acexcep.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acnames.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acoutput.h ACPICA: Fix unresolved name issue for no-debug and no-error-msg cases 2011-03-02 19:38:04 -05:00
acpi_bus.h Merge branch 'linus' into release 2011-03-23 02:34:54 -04:00
acpi_drivers.h ACPI: remove dead code 2010-10-19 13:44:21 -04:00
acpi_numa.h ACPI: misc cleanups 2008-02-07 03:33:23 -05:00
acpi.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acpiosxf.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
acpixf.h ACPICA: Update version to 20110316 2011-03-23 00:18:19 -04:00
acrestyp.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
actbl1.h Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2011-01-20 16:28:34 -08:00
actbl2.h ACPICA: Header support for SLIC table 2011-03-23 00:18:18 -04:00
actbl.h Fix common misspellings 2011-03-31 11:26:23 -03:00
actypes.h ACPICA: Update all ACPICA copyrights and signons to 2011 2011-01-18 23:48:03 -05:00
apei.h ACPI, APEI, Add ERST record ID cache 2011-03-21 22:59:06 -04:00
atomicio.h ACPI, IO memory pre-mapping and atomic accessing 2010-05-19 11:40:03 -04:00
button.h ACPI: make ACPI button funcs no-ops if not built in 2009-09-17 14:48:23 -07:00
container.h
hed.h ACPI Hardware Error Device (PNP0C33) support 2010-05-19 22:40:24 -04:00
pdc_intel.h ACPI: Enable bit 11 in _PDC to advertise hw coord 2009-02-07 00:41:14 -05:00
processor.h ACPI: processor: fix processor_physically_present in UP kernel 2011-05-29 02:17:56 -04:00
reboot.h Add the ability to reset the machine using the RESET_REG in ACPI's FADT table. 2008-07-16 23:27:08 +02:00
video.h ACPI: video: fix build for CONFIG_ACPI=n 2010-12-11 02:01:46 -05:00