Subject: [patch 18/20] ACPI based I/O APIC hot-plug: add interfaces

From: [email-masked]
Date: Thu, 28 Apr 2005 00:25:58 -0700

From: "Kenji Kaneshige" <[email-masked]>

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 <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 arch/i386/kernel/acpi/boot.c |   16 ++++++++++++++++
 arch/ia64/kernel/acpi.c      |   17 +++++++++++++++++
 include/linux/acpi.h         |    3 +++
 3 files changed, 36 insertions(+)

--- gregkh-2.6.orig/arch/i386/kernel/acpi/boot.c	2005-04-20 21:25:10.000000000 -0700
+++ gregkh-2.6/arch/i386/kernel/acpi/boot.c	2005-05-03 22:28:52.000000000 -0700
@@ -506,6 +506,22 @@
 EXPORT_SYMBOL(acpi_unmap_lsapic);
 #endif /* CONFIG_ACPI_HOTPLUG_CPU */
 
+int
+acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_register_ioapic);
+
+int
+acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_unregister_ioapic);
+
 static unsigned long __init
 acpi_scan_rsdp (
 	unsigned long		start,
--- gregkh-2.6.orig/arch/ia64/kernel/acpi.c	2005-04-06 11:47:46.000000000 -0700
+++ gregkh-2.6/arch/ia64/kernel/acpi.c	2005-05-03 22:28:52.000000000 -0700
@@ -838,4 +838,21 @@
 	return AE_OK;
 }
 #endif /* CONFIG_NUMA */
+
+int
+acpi_register_ioapic (acpi_handle handle, u64 phys_addr, u32 gsi_base)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_register_ioapic);
+
+int
+acpi_unregister_ioapic (acpi_handle handle, u32 gsi_base)
+{
+	/* TBD */
+	return -EINVAL;
+}
+EXPORT_SYMBOL(acpi_unregister_ioapic);
+
 #endif /* CONFIG_ACPI_BOOT */
--- gregkh-2.6.orig/include/linux/acpi.h	2005-04-06 11:47:48.000000000 -0700
+++ gregkh-2.6/include/linux/acpi.h	2005-05-03 22:28:52.000000000 -0700
@@ -403,6 +403,9 @@
 int acpi_unmap_lsapic(int cpu);
 #endif /* CONFIG_ACPI_HOTPLUG_CPU */
 
+int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
+int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
+
 extern int acpi_mp_config;
 
 extern u32 pci_mmcfg_base_addr;