]> git.baikalelectronics.ru Git - kernel.git/commit
x86/acpi: Restore the order of CPU IDs
authorDou Liyang <douly.fnst@cn.fujitsu.com>
Fri, 3 Mar 2017 08:02:25 +0000 (16:02 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 11 Mar 2017 13:41:19 +0000 (14:41 +0100)
commitf3512edb4fb9b74dc3943a0f46d655af39a75f1a
tree62f6c80ab0574c310865eee96ce8bbd8ebc10490
parent88717e1592e3740bf2f4b6d7b35cb614217f2454
x86/acpi: Restore the order of CPU IDs

The following commits:

  d9eb1b2f4b ("x86/acpi: Enable acpi to register all possible cpus at
boot time") and d5122ea5c7 ("x86/acpi: Introduce persistent storage
for cpuid <-> apicid mapping")

... registered all the possible CPUs at boot time via ACPI tables to
make the mapping of cpuid <-> apicid fixed. Both enabled and disabled
CPUs could have a logical CPU ID after boot time.

But, ACPI tables are unreliable. the number amd order of Local APIC
entries which depends on the firmware is often inconsistent with the
physical devices. Even if they are consistent, The disabled CPUs which
take up some logical CPU IDs will also make the order discontinuous.

Revert the part of disabled CPUs registration, keep the allocation
logic of logical CPU IDs and also keep some code location changes.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Tested-by: Xiaolong Ye <xiaolong.ye@intel.com>
Cc: rjw@rjwysocki.net
Cc: linux-acpi@vger.kernel.org
Cc: guzheng1@huawei.com
Cc: izumi.taku@jp.fujitsu.com
Cc: lenb@kernel.org
Link: http://lkml.kernel.org/r/1488528147-2279-4-git-send-email-douly.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/apic/apic.c