[PATCH] ACPI based I/O APIC hot-plug: add interfaces

This patch adds the following new interfaces for I/O xAPIC
hotplug. The implementation of these interfaces depends on each
architecture.

o int acpi_register_ioapic(acpi_handle handle, u64 phys_addr,
u32 gsi_base);

This new interface is to add a new I/O xAPIC specified by
phys_addr and gsi_base pair. phys_addr is the physical address
to which the I/O xAPIC is mapped and gsi_base is global system
interrupt base of the I/O xAPIC. acpi_register_ioapic returns
0 on success, or negative value on error.

o int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);

This new interface is to remove a I/O xAPIC specified by
gsi_base. acpi_unregister_ioapic returns 0 on success, or
negative value on error.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Kenji Kaneshige and committed by Greg Kroah-Hartman b1bb248a 8d50e332

+36
+16
arch/i386/kernel/acpi/boot.c
··· 507 507 EXPORT_SYMBOL(acpi_unmap_lsapic); 508 508 #endif /* CONFIG_ACPI_HOTPLUG_CPU */ 509 509 510 + int 511 + acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) 512 + { 513 + /* TBD */ 514 + return -EINVAL; 515 + } 516 + EXPORT_SYMBOL(acpi_register_ioapic); 517 + 518 + int 519 + acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) 520 + { 521 + /* TBD */ 522 + return -EINVAL; 523 + } 524 + EXPORT_SYMBOL(acpi_unregister_ioapic); 525 + 510 526 static unsigned long __init 511 527 acpi_scan_rsdp ( 512 528 unsigned long start,
+17
arch/ia64/kernel/acpi.c
··· 825 825 return AE_OK; 826 826 } 827 827 #endif /* CONFIG_NUMA */ 828 + 829 + int 830 + acpi_register_ioapic (acpi_handle handle, u64 phys_addr, u32 gsi_base) 831 + { 832 + /* TBD */ 833 + return -EINVAL; 834 + } 835 + EXPORT_SYMBOL(acpi_register_ioapic); 836 + 837 + int 838 + acpi_unregister_ioapic (acpi_handle handle, u32 gsi_base) 839 + { 840 + /* TBD */ 841 + return -EINVAL; 842 + } 843 + EXPORT_SYMBOL(acpi_unregister_ioapic); 844 + 828 845 #endif /* CONFIG_ACPI_BOOT */
+3
include/linux/acpi.h
··· 407 407 int acpi_unmap_lsapic(int cpu); 408 408 #endif /* CONFIG_ACPI_HOTPLUG_CPU */ 409 409 410 + int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); 411 + int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); 412 + 410 413 extern int acpi_mp_config; 411 414 412 415 extern u32 pci_mmcfg_base_addr;