aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/acpi
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-10-27 01:21:45 -0400
committerThomas Gleixner <tglx@linutronix.de>2014-12-16 08:08:15 -0500
commit7db298cb70125e322dfdb3f41e8129681a6f6b20 (patch)
tree66287d40cde079efdcc00cbd701cbd472506b625 /arch/x86/kernel/acpi
parent5da2fd26193433006255d534b3a01eae37e58428 (diff)
x86, irq, ACPI: Implement interface to support ACPI based IOAPIC hot-addition
Implement acpi_register_ioapic() and enhance mp_register_ioapic() to support ACPI based IOAPIC hot-addition. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Grant Likely <grant.likely@linaro.org> Cc: Prarit Bhargava <prarit@redhat.com> Link: http://lkml.kernel.org/r/1414387308-27148-16-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r--arch/x86/kernel/acpi/boot.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 2d76f022adc2..0b993511e0c5 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -780,8 +780,35 @@ EXPORT_SYMBOL(acpi_unmap_lsapic);
780 780
781int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) 781int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
782{ 782{
783 /* TBD */ 783 int ret = -ENOSYS;
784 return -EINVAL; 784#ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
785 int ioapic_id;
786 u64 addr;
787 struct ioapic_domain_cfg cfg = {
788 .type = IOAPIC_DOMAIN_DYNAMIC,
789 .ops = &acpi_irqdomain_ops,
790 };
791
792 ioapic_id = acpi_get_ioapic_id(handle, gsi_base, &addr);
793 if (ioapic_id < 0) {
794 unsigned long long uid;
795 acpi_status status;
796
797 status = acpi_evaluate_integer(handle, METHOD_NAME__UID,
798 NULL, &uid);
799 if (ACPI_FAILURE(status)) {
800 acpi_handle_warn(handle, "failed to get IOAPIC ID.\n");
801 return -EINVAL;
802 }
803 ioapic_id = (int)uid;
804 }
805
806 mutex_lock(&acpi_ioapic_lock);
807 ret = mp_register_ioapic(ioapic_id, phys_addr, gsi_base, &cfg);
808 mutex_unlock(&acpi_ioapic_lock);
809#endif
810
811 return ret;
785} 812}
786 813
787EXPORT_SYMBOL(acpi_register_ioapic); 814EXPORT_SYMBOL(acpi_register_ioapic);