x86/ACPI: keep x86_cpu_to_acpiid mapping valid on CPU hotplug
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 6 Feb 2017 17:01:51 +0000 (18:01 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 7 Feb 2017 12:34:56 +0000 (13:34 +0100)
commitfebf2407418a2d6c042fcd77b206040449cb9a70
tree80c6060b05f30c5424385e21b8abfa3a7361240f
parentd5adbfcd5f7bcc6fa58a41c5c5ada0e5c826ce2c
x86/ACPI: keep x86_cpu_to_acpiid mapping valid on CPU hotplug

We may or may not have all possible CPUs in MADT on boot but in any
case we're overwriting x86_cpu_to_acpiid mapping with U32_MAX when
acpi_register_lapic() is called again on the CPU hotplug path:

acpi_processor_hotadd_init()
  -> acpi_map_cpu()
    -> acpi_register_lapic()

As we have the required acpi_id information in acpi_processor_hotadd_init()
propagate it to acpi_map_cpu() to always keep x86_cpu_to_acpiid
mapping valid.

Reported-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/ia64/kernel/acpi.c
arch/x86/kernel/acpi/boot.c
drivers/acpi/acpi_processor.c
include/linux/acpi.h