xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* IO-APIC: tweak debug key info formatting
@ 2012-02-03 13:30 Andrew Cooper
  2012-02-03 13:44 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2012-02-03 13:30 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Keir Fraser, Jan Beulich

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

The formatting of the IO-APIC debug key info has niggled me for a while,
and with the latest interrupt bug I am chasing, has finally motivated me
to fix it.

The attached patch causes all columns to line up, and removes the comma
which served no purpose in combination with the spaces already present.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com


[-- Attachment #2: dump_ioapic_irq_info_format.patch --]
[-- Type: text/x-patch, Size: 1598 bytes --]

# HG changeset patch
# Parent e2722b24dc0962de37215320b05d1bb7c4c42864
Change io_apic debug information format to align columns

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.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r e2722b24dc09 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2406,13 +2406,13 @@ void dump_ioapic_irq_info(void)
             *(((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",
+            printk("vector=%3u 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",
+                   rte.dest_mode ? "logical " : "physical",
                    rte.delivery_status, rte.polarity, rte.irr,
-                   rte.trigger ? "level" : "edge", rte.mask,
+                   rte.trigger ? "level" : "edge ", rte.mask,
                    rte.dest.logical.logical_dest);
 
             if ( entry->next == 0 )

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-03 16:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 13:30 IO-APIC: tweak debug key info formatting Andrew Cooper
2012-02-03 13:44 ` Jan Beulich
2012-02-03 13:49   ` Andrew Cooper
2012-02-03 16:36     ` IO-APIC: tweak debug key info formatting v2 Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).