ia64/xen-unstable

changeset 5778:43c21adcfc79

Add debug-key for printing IRQ/IOAPIC info.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jul 14 10:16:45 2005 +0000 (2005-07-14)
parents 1fb47826d767
children 57dfd651cca4
files xen/arch/x86/io_apic.c
line diff
     1.1 --- a/xen/arch/x86/io_apic.c	Thu Jul 14 10:12:51 2005 +0000
     1.2 +++ b/xen/arch/x86/io_apic.c	Thu Jul 14 10:16:45 2005 +0000
     1.3 @@ -27,6 +27,7 @@
     1.4  #include <xen/delay.h>
     1.5  #include <xen/sched.h>
     1.6  #include <xen/acpi.h>
     1.7 +#include <xen/keyhandler.h>
     1.8  #include <asm/io.h>
     1.9  #include <asm/mc146818rtc.h>
    1.10  #include <asm/smp.h>
    1.11 @@ -744,7 +745,7 @@ static inline void UNEXPECTED_IO_APIC(vo
    1.12  {
    1.13  }
    1.14  
    1.15 -void __init print_IO_APIC(void)
    1.16 +void __init __print_IO_APIC(void)
    1.17  {
    1.18      int apic, i;
    1.19      union IO_APIC_reg_00 reg_00;
    1.20 @@ -753,9 +754,6 @@ void __init print_IO_APIC(void)
    1.21      union IO_APIC_reg_03 reg_03;
    1.22      unsigned long flags;
    1.23  
    1.24 -    if (apic_verbosity == APIC_QUIET)
    1.25 -        return;
    1.26 -
    1.27      printk(KERN_DEBUG "number of MP IRQ sources: %d.\n", mp_irq_entries);
    1.28      for (i = 0; i < nr_ioapics; i++)
    1.29          printk(KERN_DEBUG "number of IO-APIC #%d registers: %d.\n",
    1.30 @@ -889,6 +887,17 @@ void __init print_IO_APIC(void)
    1.31      return;
    1.32  }
    1.33  
    1.34 +void print_IO_APIC(void)
    1.35 +{
    1.36 +    if (apic_verbosity != APIC_QUIET)
    1.37 +        __print_IO_APIC();
    1.38 +}
    1.39 +
    1.40 +void print_IO_APIC_keyhandler(unsigned char key)
    1.41 +{
    1.42 +    __print_IO_APIC();
    1.43 +}
    1.44 +
    1.45  static void __init enable_IO_APIC(void)
    1.46  {
    1.47      union IO_APIC_reg_01 reg_01;
    1.48 @@ -1531,6 +1540,8 @@ void __init setup_IO_APIC(void)
    1.49      init_IO_APIC_traps();
    1.50      check_timer();
    1.51      print_IO_APIC();
    1.52 +
    1.53 +    register_keyhandler('z', print_IO_APIC_keyhandler, "print ioapic info");
    1.54  }
    1.55  
    1.56  /* --------------------------------------------------------------------------