[PATCH 2/2] x86, ioapic: Announce resources reserved for IOAPICs

Bjorn Helgaas
2011-08-25T23:06:13Z

Delay the IOAPIC output a bit so we can print the actual resources we
reserve.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
arch/x86/kernel/apic/io_apic.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 8eb863e..914027e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3876,6 +3876,7 @@ void __init ioapic_and_gsi_init(void)
{
unsigned long ioapic_phys, idx = FIX_IO_APIC_BASE_0;
struct resource *ioapic_res;
+ struct mp_ioapic_gsi *gsi_cfg;
int i;

ioapic_res = ioapic_setup_resources(nr_ioapics);
@@ -3908,6 +3909,13 @@ fake_ioapic_page:

ioapic_res->start = ioapic_phys;
ioapic_res->end = ioapic_phys + IO_APIC_SLOT_SIZE - 1;
+
+ gsi_cfg = mp_ioapic_gsi_routing(i);
+
+ printk(KERN_INFO "IOAPIC[%d]: id %d v%d %pR GSI %d-%d\n",
+ i, mpc_ioapic_id(i), mpc_ioapic_ver(i), ioapic_res,
+ gsi_cfg->gsi_base, gsi_cfg->gsi_end);
+
ioapic_res++;
}

@@ -4016,11 +4024,6 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
if (gsi_cfg->gsi_end >= gsi_top)
gsi_top = gsi_cfg->gsi_end + 1;

- printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
- "GSI %d-%d\n", idx, mpc_ioapic_id(idx),
- mpc_ioapic_ver(idx), mpc_ioapic_addr(idx),
- gsi_cfg->gsi_base, gsi_cfg->gsi_end);
-
nr_ioapics++;
}