ACPI: Add weak routines for ACPI CPU Hotplug
authorAshwin Chaugule <ashwin.chaugule@linaro.org>
Wed, 9 Sep 2015 20:27:06 +0000 (16:27 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Oct 2015 21:08:03 +0000 (23:08 +0200)
Add weak functions for architectures which do not support
hot-adding and removing CPUs which aren't detected at
bootup. (e.g. via MADT).

This helps preserve the Kconfig dependency from:

commit cbfc1bae55bb ("[ACPI] ACPI_HOTPLUG_CPU Kconfig dependency
update")

    prevent:

    HOTPLUG_CPU=y
    ACPI_PROCESSOR=y
    ACPI_HOTPLUG_CPU=n

Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_processor.c

index 985b8a83184e1e366ad39c3b326a1619b0b97bcb..6979186dbd4b45bd19b60b51d4fd76c76abd683f 100644 (file)
@@ -164,6 +164,24 @@ static int acpi_processor_errata(void)
    -------------------------------------------------------------------------- */
 
 #ifdef CONFIG_ACPI_HOTPLUG_CPU
+int __weak acpi_map_cpu(acpi_handle handle,
+               phys_cpuid_t physid, int *pcpu)
+{
+       return -ENODEV;
+}
+
+int __weak acpi_unmap_cpu(int cpu)
+{
+       return -ENODEV;
+}
+
+int __weak arch_register_cpu(int cpu)
+{
+       return -ENODEV;
+}
+
+void __weak arch_unregister_cpu(int cpu) {}
+
 static int acpi_processor_hotadd_init(struct acpi_processor *pr)
 {
        unsigned long long sta;