[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] IO-APIC: Reformat IO-APIC RTE debug info (v2)



# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1329993168 0
# Node ID 0b0d74c970102af1ddcc4eddd9563b5a945df5e1
# Parent  4cb8d9c9d46bbb64bd9ac1d7b71b085d57fe6c96
IO-APIC: Reformat IO-APIC RTE debug info (v2)

Having the columns aligned makes for much easier reading.  Also remove
the commas which only add to visual clutter in combination with
spaces.

Furthermore, printing fewer characters makes it less likely that the
serial buffer will overflow resulting in loss of critical debugging
information.

Changes since v1:
 *  Format vector as hex rather than dec
 *  Contract some names
 *  destination mode uses 'L' or 'P' instead of full words
 *  trigger mode uses 'L' or 'E' instead of full words
 *  delivery mode uses short string instead of a number

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   24700:5bd5830dea13
xen-unstable date:        Mon Feb 06 13:17:46 2012 -0800
---


diff -r 4cb8d9c9d46b -r 0b0d74c97010 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Thu Feb 23 10:31:48 2012 +0000
+++ b/xen/arch/x86/io_apic.c    Thu Feb 23 10:32:48 2012 +0000
@@ -2554,6 +2554,23 @@
     return 0;
 }
 
+static const char * delivery_mode_2_str(
+    const enum ioapic_irq_destination_types mode)
+{
+    switch ( mode )
+    {
+    case dest_Fixed: return "Fixed";
+    case dest_LowestPrio: return "LoPri";
+    case dest_SMI: return "SMI";
+    case dest_NMI: return "NMI";
+    case dest_INIT: return "INIT";
+    case dest_ExtINT: return "ExINT";
+    case dest__reserved_1:
+    case dest__reserved_2: return "Resvd";
+    default: return "INVAL";
+    }
+}
+
 void dump_ioapic_irq_info(void)
 {
     struct irq_pin_list *entry;
@@ -2586,13 +2603,12 @@
             *(((int *)&rte) + 1) = io_apic_read(entry->apic, 0x11 + 2 * pin);
             spin_unlock_irqrestore(&ioapic_lock, flags);
 
-            printk("vector=%u, delivery_mode=%u, dest_mode=%s, "
-                   "delivery_status=%d, polarity=%d, irr=%d, "
-                   "trigger=%s, mask=%d, dest_id:%d\n",
-                   rte.vector, rte.delivery_mode,
-                   rte.dest_mode ? "logical" : "physical",
+            printk("vec=%02x delivery=%-5s dest=%c status=%d "
+                   "polarity=%d irr=%d trig=%c mask=%d dest_id:%d\n",
+                   rte.vector, delivery_mode_2_str(rte.delivery_mode),
+                   rte.dest_mode ? 'L' : 'P',
                    rte.delivery_status, rte.polarity, rte.irr,
-                   rte.trigger ? "level" : "edge", rte.mask,
+                   rte.trigger ? 'L' : 'E', rte.mask,
                    rte.dest.logical.logical_dest);
 
             if ( entry->next == 0 )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.