ia64/xen-unstable

changeset 8604:9d72a5b18107

Merge with xen-ia64-unstable.hg
author kaf24@firebug.cl.cam.ac.uk
date Sat Jan 14 01:04:06 2006 +0100 (2006-01-14)
parents cfa3b96b056d 468d2a6fc0af
children ef88c2db00ad
files
line diff
     1.1 --- a/xen/arch/x86/nmi.c	Fri Jan 13 14:58:41 2006 -0600
     1.2 +++ b/xen/arch/x86/nmi.c	Sat Jan 14 01:04:06 2006 +0100
     1.3 @@ -448,9 +448,31 @@ static void do_nmi_trigger(unsigned char
     1.4      local_irq_enable();
     1.5  }
     1.6  
     1.7 +static void do_nmi_stats(unsigned char key)
     1.8 +{
     1.9 +    int i;
    1.10 +    struct domain *d;
    1.11 +    struct vcpu *v;
    1.12 +    printk("CPU\tNMI\n");
    1.13 +    for_each_cpu(i)
    1.14 +        printk("%3d\t%3d\n", i, nmi_count(i));
    1.15 +
    1.16 +    if ((d = dom0) == NULL)
    1.17 +        return;
    1.18 +    if ((v = d->vcpu[0]) == NULL)
    1.19 +        return;
    1.20 +    if (v->vcpu_flags & (VCPUF_nmi_pending|VCPUF_nmi_masked))
    1.21 +        printk("dom0 vpu0: NMI %s%s\n",
    1.22 +               v->vcpu_flags & VCPUF_nmi_pending ? "pending " : "",
    1.23 +               v->vcpu_flags & VCPUF_nmi_masked ? "masked " : "");
    1.24 +    else
    1.25 +        printk("dom0 vcpu0: NMI neither pending nor masked\n");
    1.26 +}
    1.27 +
    1.28  static __init int register_nmi_trigger(void)
    1.29  {
    1.30      register_keyhandler('n', do_nmi_trigger, "trigger an NMI");
    1.31 +    register_keyhandler('N', do_nmi_stats,   "NMI statistics");
    1.32      return 0;
    1.33  }
    1.34  __initcall(register_nmi_trigger);
     2.1 --- a/xen/common/keyhandler.c	Fri Jan 13 14:58:41 2006 -0600
     2.2 +++ b/xen/common/keyhandler.c	Sat Jan 14 01:04:06 2006 +0100
     2.3 @@ -185,27 +185,6 @@ void do_debug_key(unsigned char key, str
     2.4                               bit. */
     2.5  }
     2.6  
     2.7 -void do_nmi_stats(unsigned char key)
     2.8 -{
     2.9 -    int i;
    2.10 -    struct domain *d;
    2.11 -    struct vcpu *v;
    2.12 -    printk("CPU\tNMI\n");
    2.13 -    for_each_cpu(i)
    2.14 -        printk("%3d\t%3d\n", i, nmi_count(i));
    2.15 -
    2.16 -    if ((d = dom0) == NULL)
    2.17 -        return;
    2.18 -    if ((v = d->vcpu[0]) == NULL)
    2.19 -        return;
    2.20 -    if (v->vcpu_flags & (VCPUF_nmi_pending|VCPUF_nmi_masked))
    2.21 -        printk("dom0 vpu0: NMI %s%s\n",
    2.22 -               v->vcpu_flags & VCPUF_nmi_pending ? "pending " : "",
    2.23 -               v->vcpu_flags & VCPUF_nmi_masked ? "masked " : "");
    2.24 -    else
    2.25 -        printk("dom0 vcpu0: NMI neither pending nor masked\n");
    2.26 -}
    2.27 -
    2.28  #ifndef NDEBUG
    2.29  void debugtrace_key(unsigned char key)
    2.30  {
    2.31 @@ -234,7 +213,6 @@ void initialize_keytable(void)
    2.32          'r', dump_runq,      "dump run queues");
    2.33      register_irq_keyhandler(
    2.34          'R', halt_machine,   "reboot machine"); 
    2.35 -    register_keyhandler('N', do_nmi_stats,   "NMI statistics");
    2.36  
    2.37  #ifndef NDEBUG
    2.38      register_keyhandler(