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


Zhang Rui <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]
                   |                            |orge.net,
                   |                            |[email protected]
            Summary|Kernel panic on boot,       |Kernel panic on boot,
                   |Samsung NP-X120-XA02 laptop |Samsung NP-X120-XA02 laptop
                   |                            |-- caused by commit
                   |                            |856b185dd23da39e562983fbf28
                   |                            |860f54e661b41




--- Comment #4 from Zhang Rui <[email protected]>  2010-08-16 05:27:56 ---
caused by commit 856b185dd23da39e562983fbf28860f54e661b41.

commit 856b185dd23da39e562983fbf28860f54e661b41
Author: Alex Chiang <[email protected]>
Date:   Thu Jun 17 09:08:54 2010 -0600

    ACPI: processor: fix processor_physically_present on UP

    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 <[email protected]>:
    Reviewed-by: Chen Gong <[email protected]>
    Signed-off-by: Alex Chiang <[email protected]>
    Signed-off-by: Len Brown <[email protected]>

diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 5128435..e9699aa 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -223,7 +223,7 @@ static bool processor_physically_present(acpi_handle
handle)
        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;

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are watching the assignee of the bug.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
acpi-bugzilla mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to