aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2012-03-30 14:47:07 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2012-05-07 08:35:00 -0400
commit95a02e976c39d63716b8c7c226bc530a2041536f (patch)
tree8c8992e117ad625491f3233f71674e40825474da /arch/x86/kernel/apic/io_apic.c
parent263b5e8629c9ce21c9cd4c0e29c097afb1c10ef3 (diff)
iommu: rename intr_remapping references to irq_remapping
Make the code consistent with the naming conventions of irq subsystem. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Joerg Roedel <joerg.roedel@amd.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r--arch/x86/kernel/apic/io_apic.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 073edd1d3c66..abbbcd4d1d71 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1381,9 +1381,9 @@ static int setup_ioapic_entry(int irq, struct IO_APIC_route_entry *entry,
1381 unsigned int destination, int vector, 1381 unsigned int destination, int vector,
1382 struct io_apic_irq_attr *attr) 1382 struct io_apic_irq_attr *attr)
1383{ 1383{
1384 if (intr_remapping_enabled) 1384 if (irq_remapping_enabled)
1385 return intr_setup_ioapic_entry(irq, entry, destination, 1385 return setup_ioapic_remapped_entry(irq, entry, destination,
1386 vector, attr); 1386 vector, attr);
1387 1387
1388 memset(entry, 0, sizeof(*entry)); 1388 memset(entry, 0, sizeof(*entry));
1389 1389
@@ -1540,7 +1540,7 @@ static void __init setup_timer_IRQ0_pin(unsigned int ioapic_idx,
1540{ 1540{
1541 struct IO_APIC_route_entry entry; 1541 struct IO_APIC_route_entry entry;
1542 1542
1543 if (intr_remapping_enabled) 1543 if (irq_remapping_enabled)
1544 return; 1544 return;
1545 1545
1546 memset(&entry, 0, sizeof(entry)); 1546 memset(&entry, 0, sizeof(entry));
@@ -1626,7 +1626,7 @@ __apicdebuginit(void) print_IO_APIC(int ioapic_idx)
1626 1626
1627 printk(KERN_DEBUG ".... IRQ redirection table:\n"); 1627 printk(KERN_DEBUG ".... IRQ redirection table:\n");
1628 1628
1629 if (intr_remapping_enabled) { 1629 if (irq_remapping_enabled) {
1630 printk(KERN_DEBUG " NR Indx Fmt Mask Trig IRR" 1630 printk(KERN_DEBUG " NR Indx Fmt Mask Trig IRR"
1631 " Pol Stat Indx2 Zero Vect:\n"); 1631 " Pol Stat Indx2 Zero Vect:\n");
1632 } else { 1632 } else {
@@ -1635,7 +1635,7 @@ __apicdebuginit(void) print_IO_APIC(int ioapic_idx)
1635 } 1635 }
1636 1636
1637 for (i = 0; i <= reg_01.bits.entries; i++) { 1637 for (i = 0; i <= reg_01.bits.entries; i++) {
1638 if (intr_remapping_enabled) { 1638 if (irq_remapping_enabled) {
1639 struct IO_APIC_route_entry entry; 1639 struct IO_APIC_route_entry entry;
1640 struct IR_IO_APIC_route_entry *ir_entry; 1640 struct IR_IO_APIC_route_entry *ir_entry;
1641 1641
@@ -2002,7 +2002,7 @@ void disable_IO_APIC(void)
2002 * IOAPIC RTE as well as interrupt-remapping table entry). 2002 * IOAPIC RTE as well as interrupt-remapping table entry).
2003 * As this gets called during crash dump, keep this simple for now. 2003 * As this gets called during crash dump, keep this simple for now.
2004 */ 2004 */
2005 if (ioapic_i8259.pin != -1 && !intr_remapping_enabled) { 2005 if (ioapic_i8259.pin != -1 && !irq_remapping_enabled) {
2006 struct IO_APIC_route_entry entry; 2006 struct IO_APIC_route_entry entry;
2007 2007
2008 memset(&entry, 0, sizeof(entry)); 2008 memset(&entry, 0, sizeof(entry));
@@ -2026,7 +2026,7 @@ void disable_IO_APIC(void)
2026 * Use virtual wire A mode when interrupt remapping is enabled. 2026 * Use virtual wire A mode when interrupt remapping is enabled.
2027 */ 2027 */
2028 if (cpu_has_apic || apic_from_smp_config()) 2028 if (cpu_has_apic || apic_from_smp_config())
2029 disconnect_bsp_APIC(!intr_remapping_enabled && 2029 disconnect_bsp_APIC(!irq_remapping_enabled &&
2030 ioapic_i8259.pin != -1); 2030 ioapic_i8259.pin != -1);
2031} 2031}
2032 2032
@@ -2586,7 +2586,7 @@ static void irq_remap_modify_chip_defaults(struct irq_chip *chip)
2586 chip->irq_eoi = ir_ack_apic_level; 2586 chip->irq_eoi = ir_ack_apic_level;
2587 2587
2588#ifdef CONFIG_SMP 2588#ifdef CONFIG_SMP
2589 chip->irq_set_affinity = intr_set_affinity; 2589 chip->irq_set_affinity = set_remapped_irq_affinity;
2590#endif 2590#endif
2591} 2591}
2592#endif /* CONFIG_IRQ_REMAP */ 2592#endif /* CONFIG_IRQ_REMAP */
@@ -2799,7 +2799,7 @@ static inline void __init check_timer(void)
2799 * 8259A. 2799 * 8259A.
2800 */ 2800 */
2801 if (pin1 == -1) { 2801 if (pin1 == -1) {
2802 if (intr_remapping_enabled) 2802 if (irq_remapping_enabled)
2803 panic("BIOS bug: timer not connected to IO-APIC"); 2803 panic("BIOS bug: timer not connected to IO-APIC");
2804 pin1 = pin2; 2804 pin1 = pin2;
2805 apic1 = apic2; 2805 apic1 = apic2;
@@ -2832,7 +2832,7 @@ static inline void __init check_timer(void)
2832 clear_IO_APIC_pin(0, pin1); 2832 clear_IO_APIC_pin(0, pin1);
2833 goto out; 2833 goto out;
2834 } 2834 }
2835 if (intr_remapping_enabled) 2835 if (irq_remapping_enabled)
2836 panic("timer doesn't work through Interrupt-remapped IO-APIC"); 2836 panic("timer doesn't work through Interrupt-remapped IO-APIC");
2837 local_irq_disable(); 2837 local_irq_disable();
2838 clear_IO_APIC_pin(apic1, pin1); 2838 clear_IO_APIC_pin(apic1, pin1);
@@ -3056,7 +3056,7 @@ void destroy_irq(unsigned int irq)
3056 irq_set_status_flags(irq, IRQ_NOREQUEST|IRQ_NOPROBE); 3056 irq_set_status_flags(irq, IRQ_NOREQUEST|IRQ_NOPROBE);
3057 3057
3058 if (irq_remapped(cfg)) 3058 if (irq_remapped(cfg))
3059 intr_free_irq(irq); 3059 free_remapped_irq(irq);
3060 raw_spin_lock_irqsave(&vector_lock, flags); 3060 raw_spin_lock_irqsave(&vector_lock, flags);
3061 __clear_irq_vector(irq, cfg); 3061 __clear_irq_vector(irq, cfg);
3062 raw_spin_unlock_irqrestore(&vector_lock, flags); 3062 raw_spin_unlock_irqrestore(&vector_lock, flags);
@@ -3085,7 +3085,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq,
3085 dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus()); 3085 dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus());
3086 3086
3087 if (irq_remapped(cfg)) { 3087 if (irq_remapped(cfg)) {
3088 intr_compose_msi_msg(pdev, irq, dest, msg, hpet_id); 3088 compose_remapped_msi_msg(pdev, irq, dest, msg, hpet_id);
3089 return err; 3089 return err;
3090 } 3090 }
3091 3091
@@ -3198,7 +3198,7 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3198 if (irq == 0) 3198 if (irq == 0)
3199 return -1; 3199 return -1;
3200 irq_want = irq + 1; 3200 irq_want = irq + 1;
3201 if (!intr_remapping_enabled) 3201 if (!irq_remapping_enabled)
3202 goto no_ir; 3202 goto no_ir;
3203 3203
3204 if (!sub_handle) { 3204 if (!sub_handle) {
@@ -3206,13 +3206,14 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3206 * allocate the consecutive block of IRTE's 3206 * allocate the consecutive block of IRTE's
3207 * for 'nvec' 3207 * for 'nvec'
3208 */ 3208 */
3209 index = intr_msi_alloc_irq(dev, irq, nvec); 3209 index = msi_alloc_remapped_irq(dev, irq, nvec);
3210 if (index < 0) { 3210 if (index < 0) {
3211 ret = index; 3211 ret = index;
3212 goto error; 3212 goto error;
3213 } 3213 }
3214 } else { 3214 } else {
3215 ret = intr_msi_setup_irq(dev, irq, index, sub_handle); 3215 ret = msi_setup_remapped_irq(dev, irq, index,
3216 sub_handle);
3216 if (ret < 0) 3217 if (ret < 0)
3217 goto error; 3218 goto error;
3218 } 3219 }
@@ -3332,8 +3333,8 @@ int arch_setup_hpet_msi(unsigned int irq, unsigned int id)
3332 struct msi_msg msg; 3333 struct msi_msg msg;
3333 int ret; 3334 int ret;
3334 3335
3335 if (intr_remapping_enabled) { 3336 if (irq_remapping_enabled) {
3336 if (!intr_setup_hpet_msi(irq, id)) 3337 if (!setup_hpet_msi_remapped(irq, id))
3337 return -1; 3338 return -1;
3338 } 3339 }
3339 3340
@@ -3712,8 +3713,8 @@ void __init setup_ioapic_dest(void)
3712 else 3713 else
3713 mask = apic->target_cpus(); 3714 mask = apic->target_cpus();
3714 3715
3715 if (intr_remapping_enabled) 3716 if (irq_remapping_enabled)
3716 intr_set_affinity(idata, mask, false); 3717 set_remapped_irq_affinity(idata, mask, false);
3717 else 3718 else
3718 ioapic_set_affinity(idata, mask, false); 3719 ioapic_set_affinity(idata, mask, false);
3719 } 3720 }