x86: make struct config_ioapic not MPspec specific
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Thomas Gleixner
parent
5f8951487d
commit
ec2cd0a22e
@@ -887,8 +887,8 @@ static u8 __init uniq_ioapic_id(u8 id)
|
||||
DECLARE_BITMAP(used, 256);
|
||||
bitmap_zero(used, 256);
|
||||
for (i = 0; i < nr_ioapics; i++) {
|
||||
struct mpc_config_ioapic *ia = &mp_ioapics[i];
|
||||
__set_bit(ia->mpc_apicid, used);
|
||||
struct mp_config_ioapic *ia = &mp_ioapics[i];
|
||||
__set_bit(ia->mp_apicid, used);
|
||||
}
|
||||
if (!test_bit(id, used))
|
||||
return id;
|
||||
@@ -920,29 +920,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
|
||||
|
||||
idx = nr_ioapics;
|
||||
|
||||
mp_ioapics[idx].mpc_type = MP_IOAPIC;
|
||||
mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
|
||||
mp_ioapics[idx].mpc_apicaddr = address;
|
||||
mp_ioapics[idx].mp_type = MP_IOAPIC;
|
||||
mp_ioapics[idx].mp_flags = MPC_APIC_USABLE;
|
||||
mp_ioapics[idx].mp_apicaddr = address;
|
||||
|
||||
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
|
||||
mp_ioapics[idx].mpc_apicid = uniq_ioapic_id(id);
|
||||
mp_ioapics[idx].mp_apicid = uniq_ioapic_id(id);
|
||||
#ifdef CONFIG_X86_32
|
||||
mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
|
||||
mp_ioapics[idx].mp_apicver = io_apic_get_version(idx);
|
||||
#else
|
||||
mp_ioapics[idx].mpc_apicver = 0;
|
||||
mp_ioapics[idx].mp_apicver = 0;
|
||||
#endif
|
||||
/*
|
||||
* Build basic GSI lookup table to facilitate gsi->io_apic lookups
|
||||
* and to prevent reprogramming of IOAPIC pins (PCI GSIs).
|
||||
*/
|
||||
mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mpc_apicid;
|
||||
mp_ioapic_routing[idx].apic_id = mp_ioapics[idx].mp_apicid;
|
||||
mp_ioapic_routing[idx].gsi_base = gsi_base;
|
||||
mp_ioapic_routing[idx].gsi_end = gsi_base +
|
||||
io_apic_get_redir_entries(idx);
|
||||
|
||||
printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
|
||||
"GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
|
||||
mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
|
||||
printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
|
||||
"GSI %d-%d\n", idx, mp_ioapics[idx].mp_apicid,
|
||||
mp_ioapics[idx].mp_apicver, mp_ioapics[idx].mp_apicaddr,
|
||||
mp_ioapic_routing[idx].gsi_base, mp_ioapic_routing[idx].gsi_end);
|
||||
|
||||
nr_ioapics++;
|
||||
@@ -975,7 +975,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
|
||||
mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS;
|
||||
mp_irqs[mp_irq_entries].mpc_srcbusirq = bus_irq; /* IRQ */
|
||||
mp_irqs[mp_irq_entries].mpc_dstapic =
|
||||
mp_ioapics[ioapic].mpc_apicid; /* APIC ID */
|
||||
mp_ioapics[ioapic].mp_apicid; /* APIC ID */
|
||||
mp_irqs[mp_irq_entries].mpc_dstirq = pin; /* INTIN# */
|
||||
|
||||
if (++mp_irq_entries == MAX_IRQ_SOURCES)
|
||||
@@ -1016,7 +1016,7 @@ void __init mp_config_acpi_legacy_irqs(void)
|
||||
mp_irqs[mp_irq_entries].mpc_irqflag = 0; /* Conforming */
|
||||
mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS;
|
||||
#ifdef CONFIG_X86_IO_APIC
|
||||
mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
|
||||
mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mp_apicid;
|
||||
#endif
|
||||
/*
|
||||
* Use the default configuration for the IRQs 0-15. Unless
|
||||
|
Reference in New Issue
Block a user