aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/io_apic_64.c')
-rw-r--r--arch/x86/kernel/io_apic_64.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index ef1a8dfcc529..4555ad8c2070 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -104,7 +104,7 @@ DEFINE_SPINLOCK(vector_lock);
104int nr_ioapic_registers[MAX_IO_APICS]; 104int nr_ioapic_registers[MAX_IO_APICS];
105 105
106/* I/O APIC entries */ 106/* I/O APIC entries */
107struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS]; 107struct mp_config_ioapic mp_ioapics[MAX_IO_APICS];
108int nr_ioapics; 108int nr_ioapics;
109 109
110/* MP IRQ source entries */ 110/* MP IRQ source entries */
@@ -140,7 +140,7 @@ struct io_apic {
140static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx) 140static __attribute_const__ struct io_apic __iomem *io_apic_base(int idx)
141{ 141{
142 return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx) 142 return (void __iomem *) __fix_to_virt(FIX_IO_APIC_BASE_0 + idx)
143 + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK); 143 + (mp_ioapics[idx].mp_apicaddr & ~PAGE_MASK);
144} 144}
145 145
146static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) 146static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
@@ -454,7 +454,7 @@ static int find_irq_entry(int apic, int pin, int type)
454 454
455 for (i = 0; i < mp_irq_entries; i++) 455 for (i = 0; i < mp_irq_entries; i++)
456 if (mp_irqs[i].mpc_irqtype == type && 456 if (mp_irqs[i].mpc_irqtype == type &&
457 (mp_irqs[i].mpc_dstapic == mp_ioapics[apic].mpc_apicid || 457 (mp_irqs[i].mpc_dstapic == mp_ioapics[apic].mp_apicid ||
458 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) && 458 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) &&
459 mp_irqs[i].mpc_dstirq == pin) 459 mp_irqs[i].mpc_dstirq == pin)
460 return i; 460 return i;
@@ -496,7 +496,7 @@ static int __init find_isa_irq_apic(int irq, int type)
496 if (i < mp_irq_entries) { 496 if (i < mp_irq_entries) {
497 int apic; 497 int apic;
498 for(apic = 0; apic < nr_ioapics; apic++) { 498 for(apic = 0; apic < nr_ioapics; apic++) {
499 if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic) 499 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic)
500 return apic; 500 return apic;
501 } 501 }
502 } 502 }
@@ -524,7 +524,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
524 int lbus = mp_irqs[i].mpc_srcbus; 524 int lbus = mp_irqs[i].mpc_srcbus;
525 525
526 for (apic = 0; apic < nr_ioapics; apic++) 526 for (apic = 0; apic < nr_ioapics; apic++)
527 if (mp_ioapics[apic].mpc_apicid == mp_irqs[i].mpc_dstapic || 527 if (mp_ioapics[apic].mp_apicid == mp_irqs[i].mpc_dstapic ||
528 mp_irqs[i].mpc_dstapic == MP_APIC_ALL) 528 mp_irqs[i].mpc_dstapic == MP_APIC_ALL)
529 break; 529 break;
530 530
@@ -846,7 +846,7 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
846 apic_printk(APIC_VERBOSE,KERN_DEBUG 846 apic_printk(APIC_VERBOSE,KERN_DEBUG
847 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> " 847 "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> "
848 "IRQ %d Mode:%i Active:%i)\n", 848 "IRQ %d Mode:%i Active:%i)\n",
849 apic, mp_ioapics[apic].mpc_apicid, pin, cfg->vector, 849 apic, mp_ioapics[apic].mp_apicid, pin, cfg->vector,
850 irq, trigger, polarity); 850 irq, trigger, polarity);
851 851
852 /* 852 /*
@@ -887,10 +887,10 @@ static void __init setup_IO_APIC_irqs(void)
887 idx = find_irq_entry(apic,pin,mp_INT); 887 idx = find_irq_entry(apic,pin,mp_INT);
888 if (idx == -1) { 888 if (idx == -1) {
889 if (first_notcon) { 889 if (first_notcon) {
890 apic_printk(APIC_VERBOSE, KERN_DEBUG " IO-APIC (apicid-pin) %d-%d", mp_ioapics[apic].mpc_apicid, pin); 890 apic_printk(APIC_VERBOSE, KERN_DEBUG " IO-APIC (apicid-pin) %d-%d", mp_ioapics[apic].mp_apicid, pin);
891 first_notcon = 0; 891 first_notcon = 0;
892 } else 892 } else
893 apic_printk(APIC_VERBOSE, ", %d-%d", mp_ioapics[apic].mpc_apicid, pin); 893 apic_printk(APIC_VERBOSE, ", %d-%d", mp_ioapics[apic].mp_apicid, pin);
894 continue; 894 continue;
895 } 895 }
896 if (!first_notcon) { 896 if (!first_notcon) {
@@ -965,7 +965,7 @@ void __apicdebuginit print_IO_APIC(void)
965 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries); 965 printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
966 for (i = 0; i < nr_ioapics; i++) 966 for (i = 0; i < nr_ioapics; i++)
967 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n", 967 printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
968 mp_ioapics[i].mpc_apicid, nr_ioapic_registers[i]); 968 mp_ioapics[i].mp_apicid, nr_ioapic_registers[i]);
969 969
970 /* 970 /*
971 * We are a bit conservative about what we expect. We have to 971 * We are a bit conservative about what we expect. We have to
@@ -983,7 +983,7 @@ void __apicdebuginit print_IO_APIC(void)
983 spin_unlock_irqrestore(&ioapic_lock, flags); 983 spin_unlock_irqrestore(&ioapic_lock, flags);
984 984
985 printk("\n"); 985 printk("\n");
986 printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mpc_apicid); 986 printk(KERN_DEBUG "IO APIC #%d......\n", mp_ioapics[apic].mp_apicid);
987 printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw); 987 printk(KERN_DEBUG ".... register #00: %08X\n", reg_00.raw);
988 printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID); 988 printk(KERN_DEBUG "....... : physical APIC id: %02X\n", reg_00.bits.ID);
989 989
@@ -1841,8 +1841,8 @@ static int ioapic_resume(struct sys_device *dev)
1841 1841
1842 spin_lock_irqsave(&ioapic_lock, flags); 1842 spin_lock_irqsave(&ioapic_lock, flags);
1843 reg_00.raw = io_apic_read(dev->id, 0); 1843 reg_00.raw = io_apic_read(dev->id, 0);
1844 if (reg_00.bits.ID != mp_ioapics[dev->id].mpc_apicid) { 1844 if (reg_00.bits.ID != mp_ioapics[dev->id].mp_apicid) {
1845 reg_00.bits.ID = mp_ioapics[dev->id].mpc_apicid; 1845 reg_00.bits.ID = mp_ioapics[dev->id].mp_apicid;
1846 io_apic_write(dev->id, 0, reg_00.raw); 1846 io_apic_write(dev->id, 0, reg_00.raw);
1847 } 1847 }
1848 spin_unlock_irqrestore(&ioapic_lock, flags); 1848 spin_unlock_irqrestore(&ioapic_lock, flags);
@@ -2336,7 +2336,7 @@ void __init ioapic_init_mappings(void)
2336 ioapic_res = ioapic_setup_resources(); 2336 ioapic_res = ioapic_setup_resources();
2337 for (i = 0; i < nr_ioapics; i++) { 2337 for (i = 0; i < nr_ioapics; i++) {
2338 if (smp_found_config) { 2338 if (smp_found_config) {
2339 ioapic_phys = mp_ioapics[i].mpc_apicaddr; 2339 ioapic_phys = mp_ioapics[i].mp_apicaddr;
2340 } else { 2340 } else {
2341 ioapic_phys = (unsigned long) 2341 ioapic_phys = (unsigned long)
2342 alloc_bootmem_pages(PAGE_SIZE); 2342 alloc_bootmem_pages(PAGE_SIZE);