aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/acpi/boot.c
diff options
context:
space:
mode:
authorJiang Liu <[email protected]>2014-10-27 13:21:46 +0800
committerThomas Gleixner <[email protected]>2014-12-16 14:08:15 +0100
commit15516a3b8633a32f03a82a2db23b87cf9600514c (patch)
tree49093c302c72768b0d921c02cedcb5e252191f8b /arch/x86/kernel/acpi/boot.c
parent7db298cb70125e322dfdb3f41e8129681a6f6b20 (diff)
x86, irq, ACPI: Implement interfaces to support ACPI based IOAPIC hot-removal
Implement acpi_unregister_ioapic() to support ACPI based IOAPIC hot-removal. An IOAPIC could only be removed when all its pins are unused. Signed-off-by: Jiang Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Tony Luck <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Len Brown <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Grant Likely <[email protected]> Cc: Prarit Bhargava <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r--arch/x86/kernel/acpi/boot.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 0b993511e0c5..5427d9b70f75 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -810,15 +810,20 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
return ret;
}
-
EXPORT_SYMBOL(acpi_register_ioapic);
int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
{
- /* TBD */
- return -EINVAL;
-}
+ int ret = -ENOSYS;
+
+#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
+ mutex_lock(&acpi_ioapic_lock);
+ ret = mp_unregister_ioapic(gsi_base);
+ mutex_unlock(&acpi_ioapic_lock);
+#endif
+ return ret;
+}
EXPORT_SYMBOL(acpi_unregister_ioapic);
static int __init acpi_parse_sbf(struct acpi_table_header *table)