Messages in this thread Patch in this message | | | From | Yinghai Lu <> | Subject | [PATCH v5 29/33] PCI, x86, ACPI: Link acpi ioapic register to ioapic | Date | Thu, 2 Jan 2014 16:06:01 -0800 |
| |
During ioapic hotplug, acpi_register_ioapic will be called. Now for x86, that function is blank. Fill that will update __mp_register_ioapic to use those ioapic.
Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- arch/x86/kernel/acpi/boot.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 0f9c133..77bf505 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -651,16 +651,26 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) { - /* TBD */ - return -EINVAL; + u64 addr = 0; + int apic_id; + + apic_id = acpi_get_ioapic_id(handle, gsi_base, &addr); + + if (apic_id < 0) + return -1; + + if (phys_addr != addr) + pr_warn("ioapic 0x%02x address is not consistent _CRS/dev(%llx) _MAT/MADT(%llx) \n", + apic_id, phys_addr, addr); + + return __mp_register_ioapic(apic_id, phys_addr, gsi_base, true); } EXPORT_SYMBOL(acpi_register_ioapic); int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) { - /* TBD */ - return -EINVAL; + return mp_unregister_ioapic(gsi_base); } EXPORT_SYMBOL(acpi_unregister_ioapic); -- 1.8.4
| |