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

[Xen-changelog] Make all nmi debugkey tracing arch specific.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 468d2a6fc0afb7eec5944b90661208d13a6e1c73
# Parent  3f702887d4a62931182392c07436dcdba93a77ea
Make all nmi debugkey tracing arch specific.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 3f702887d4a6 -r 468d2a6fc0af xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c        Fri Jan 13 16:56:09 2006
+++ b/xen/arch/x86/nmi.c        Fri Jan 13 22:41:28 2006
@@ -448,9 +448,31 @@
     local_irq_enable();
 }
 
+static void do_nmi_stats(unsigned char key)
+{
+    int i;
+    struct domain *d;
+    struct vcpu *v;
+    printk("CPU\tNMI\n");
+    for_each_cpu(i)
+        printk("%3d\t%3d\n", i, nmi_count(i));
+
+    if ((d = dom0) == NULL)
+        return;
+    if ((v = d->vcpu[0]) == NULL)
+        return;
+    if (v->vcpu_flags & (VCPUF_nmi_pending|VCPUF_nmi_masked))
+        printk("dom0 vpu0: NMI %s%s\n",
+               v->vcpu_flags & VCPUF_nmi_pending ? "pending " : "",
+               v->vcpu_flags & VCPUF_nmi_masked ? "masked " : "");
+    else
+        printk("dom0 vcpu0: NMI neither pending nor masked\n");
+}
+
 static __init int register_nmi_trigger(void)
 {
     register_keyhandler('n', do_nmi_trigger, "trigger an NMI");
+    register_keyhandler('N', do_nmi_stats,   "NMI statistics");
     return 0;
 }
 __initcall(register_nmi_trigger);
diff -r 3f702887d4a6 -r 468d2a6fc0af xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Fri Jan 13 16:56:09 2006
+++ b/xen/common/keyhandler.c   Fri Jan 13 22:41:28 2006
@@ -185,27 +185,6 @@
                              bit. */
 }
 
-void do_nmi_stats(unsigned char key)
-{
-    int i;
-    struct domain *d;
-    struct vcpu *v;
-    printk("CPU\tNMI\n");
-    for_each_cpu(i)
-        printk("%3d\t%3d\n", i, nmi_count(i));
-
-    if ((d = dom0) == NULL)
-        return;
-    if ((v = d->vcpu[0]) == NULL)
-        return;
-    if (v->vcpu_flags & (VCPUF_nmi_pending|VCPUF_nmi_masked))
-        printk("dom0 vpu0: NMI %s%s\n",
-               v->vcpu_flags & VCPUF_nmi_pending ? "pending " : "",
-               v->vcpu_flags & VCPUF_nmi_masked ? "masked " : "");
-    else
-        printk("dom0 vcpu0: NMI neither pending nor masked\n");
-}
-
 #ifndef NDEBUG
 void debugtrace_key(unsigned char key)
 {
@@ -234,7 +213,6 @@
         'r', dump_runq,      "dump run queues");
     register_irq_keyhandler(
         'R', halt_machine,   "reboot machine"); 
-    register_keyhandler('N', do_nmi_stats,   "NMI statistics");
 
 #ifndef NDEBUG
     register_keyhandler(

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.