aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaga Chumbalkar <nagananda.chumbalkar@hp.com>2011-07-12 17:17:35 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-12 23:17:58 -0400
commit42f0efc5aae2bd7e3bc420c0902c7024ef77391f (patch)
tree423b5d22468c4dcc75973df470785c8efbb458db
parent3040db92ee1b6c5b6b6d73f8cdcad54c0da11563 (diff)
x86, ioapic: Print IR_IO_APIC_route_entry when IR is enabled
When IR (interrupt remapping) is enabled print_IO_APIC() displays output according to legacy RTE (redirection table entry) definitons: NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect: 00 00 1 0 0 0 0 0 0 00 01 00 0 0 0 0 0 0 0 01 02 00 0 0 0 0 0 0 0 02 03 00 1 0 0 0 0 0 0 03 04 00 1 0 0 0 0 0 0 04 05 00 1 0 0 0 0 0 0 05 06 00 1 0 0 0 0 0 0 06 ... The above output is as per Sec 3.2.4 of the IOAPIC datasheet: 82093AA I/O Advanced Programmable Interrupt Controller (IOAPIC): http://download.intel.com/design/chipsets/datashts/29056601.pdf Instead the output should display the fields as discussed in Sec 5.5.1 of the VT-d specification: (Intel Virtualization Technology for Directed I/O: http://download.intel.com/technology/computing/vptech/Intel(r)_VT_for_Direct_IO.pdf) After the fix: NR Indx Fmt Mask Trig IRR Pol Stat Indx2 Zero Vect: 00 0000 0 1 0 0 0 0 0 0 00 01 000F 1 0 0 0 0 0 0 0 01 02 0001 1 0 0 0 0 0 0 0 02 03 0002 1 1 0 0 0 0 0 0 03 04 0011 1 1 0 0 0 0 0 0 04 05 0004 1 1 0 0 0 0 0 0 05 06 0005 1 1 0 0 0 0 0 0 06 ... Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com> Link: http://lkml.kernel.org/r/20110712211658.2939.93123.sendpatchset@nchumbalkar.americas.cpqcorp.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--arch/x86/kernel/apic/io_apic.c69
1 files changed, 49 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1ed5cbb9a14a..8eb863e27ea6 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1562,31 +1562,60 @@ __apicdebuginit(void) print_IO_APIC(void)
1562 1562
1563 printk(KERN_DEBUG ".... IRQ redirection table:\n"); 1563 printk(KERN_DEBUG ".... IRQ redirection table:\n");
1564 1564
1565 printk(KERN_DEBUG " NR Dst Mask Trig IRR Pol" 1565 if (intr_remapping_enabled) {
1566 " Stat Dmod Deli Vect:\n"); 1566 printk(KERN_DEBUG " NR Indx Fmt Mask Trig IRR"
1567 " Pol Stat Indx2 Zero Vect:\n");
1568 } else {
1569 printk(KERN_DEBUG " NR Dst Mask Trig IRR Pol"
1570 " Stat Dmod Deli Vect:\n");
1571 }
1567 1572
1568 for (i = 0; i <= reg_01.bits.entries; i++) { 1573 for (i = 0; i <= reg_01.bits.entries; i++) {
1569 struct IO_APIC_route_entry entry; 1574 if (intr_remapping_enabled) {
1570 1575 struct IO_APIC_route_entry entry;
1571 entry = ioapic_read_entry(apic, i); 1576 struct IR_IO_APIC_route_entry *ir_entry;
1572 1577
1573 printk(KERN_DEBUG " %02x %02X ", 1578 entry = ioapic_read_entry(apic, i);
1574 i, 1579 ir_entry = (struct IR_IO_APIC_route_entry *) &entry;
1575 entry.dest 1580 printk(KERN_DEBUG " %02x %04X ",
1576 ); 1581 i,
1582 ir_entry->index
1583 );
1584 printk("%1d %1d %1d %1d %1d "
1585 "%1d %1d %X %02X\n",
1586 ir_entry->format,
1587 ir_entry->mask,
1588 ir_entry->trigger,
1589 ir_entry->irr,
1590 ir_entry->polarity,
1591 ir_entry->delivery_status,
1592 ir_entry->index2,
1593 ir_entry->zero,
1594 ir_entry->vector
1595 );
1596 } else {
1597 struct IO_APIC_route_entry entry;
1577 1598
1578 printk("%1d %1d %1d %1d %1d %1d %1d %02X\n", 1599 entry = ioapic_read_entry(apic, i);
1579 entry.mask, 1600 printk(KERN_DEBUG " %02x %02X ",
1580 entry.trigger, 1601 i,
1581 entry.irr, 1602 entry.dest
1582 entry.polarity, 1603 );
1583 entry.delivery_status, 1604 printk("%1d %1d %1d %1d %1d "
1584 entry.dest_mode, 1605 "%1d %1d %02X\n",
1585 entry.delivery_mode, 1606 entry.mask,
1586 entry.vector 1607 entry.trigger,
1587 ); 1608 entry.irr,
1609 entry.polarity,
1610 entry.delivery_status,
1611 entry.dest_mode,
1612 entry.delivery_mode,
1613 entry.vector
1614 );
1615 }
1588 } 1616 }
1589 } 1617 }
1618
1590 printk(KERN_DEBUG "IRQ to pin mappings:\n"); 1619 printk(KERN_DEBUG "IRQ to pin mappings:\n");
1591 for_each_active_irq(irq) { 1620 for_each_active_irq(irq) {
1592 struct irq_pin_list *entry; 1621 struct irq_pin_list *entry;