linux/arch/x86/kernel/apic
Dou Liyang 2b85b3d229 x86/acpi: Restore the order of CPU IDs
The following commits:

  f7c28833c2 ("x86/acpi: Enable acpi to register all possible cpus at
boot time") and 8f54969dc8 ("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>
2017-03-11 14:41:19 +01:00
..
apic_flat_64.c Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 17:18:52 -07:00
apic_noop.c x86: Apply more __ro_after_init and const 2016-08-10 14:55:05 +02:00
apic_numachip.c x86: Clean up various simple wrapper functions 2016-09-13 20:42:58 +02:00
apic.c x86/acpi: Restore the order of CPU IDs 2017-03-11 14:41:19 +01:00
bigsmp_32.c x86: Apply more __ro_after_init and const 2016-08-10 14:55:05 +02:00
htirq.c x86: Constify irqdomain ops 2015-05-05 11:14:48 +02:00
hw_nmi.c nmi_backtrace: add more trigger_*_cpu_backtrace() methods 2016-10-07 18:46:30 -07:00
io_apic.c Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 16:26:57 -08:00
ipi.c x86/kernel: Audit and remove any unnecessary uses of module.h 2016-07-14 15:06:41 +02:00
Makefile kernel: add kcov code coverage 2016-03-22 15:36:02 -07:00
msi.c PCI/MSI: Remove pci_msi_domain_{alloc,free}_irqs() 2017-02-10 14:30:33 -06:00
probe_32.c Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-10-03 16:13:28 -07:00
probe_64.c x86/apic: Remove duplicated include from probe_64.c 2016-07-19 16:02:31 +02:00
vector.c x86/irq, trace: Add __irq_entry annotation to x86's platform IRQ handlers 2017-01-05 08:58:49 +01:00
x2apic_cluster.c cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
x2apic_phys.c x86: Apply more __ro_after_init and const 2016-08-10 14:55:05 +02:00
x2apic_uv_x.c x86/platform/UV: Add Support for UV4 Hubless NMIs 2017-02-01 10:20:59 +01:00