Commit 820de5c39ef7f6866d2c9e6c7d208bcd2a6e1942

Authored by Ingo Molnar
Committed by Linus Torvalds
1 parent 3704540b48

highres: improve debug output

Add some more debug information to the hrtimer and clock events code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 3 changed files with 21 additions and 2 deletions Side-by-side Diff

arch/i386/kernel/apic.c
... ... @@ -524,6 +524,9 @@
524 524 */
525 525 if (nmi_watchdog != NMI_IO_APIC)
526 526 lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
  527 + else
  528 + printk(KERN_WARNING "APIC timer registered as dummy,"
  529 + " due to nmi_watchdog=1!\n");
527 530 }
528 531  
529 532 /* Setup the lapic or request the broadcast */
... ... @@ -558,7 +558,8 @@
558 558 */
559 559 static int hrtimer_switch_to_hres(void)
560 560 {
561   - struct hrtimer_cpu_base *base = &__get_cpu_var(hrtimer_bases);
  561 + int cpu = smp_processor_id();
  562 + struct hrtimer_cpu_base *base = &per_cpu(hrtimer_bases, cpu);
562 563 unsigned long flags;
563 564  
564 565 if (base->hres_active)
... ... @@ -568,6 +569,8 @@
568 569  
569 570 if (tick_init_highres()) {
570 571 local_irq_restore(flags);
  572 + printk(KERN_WARNING "Could not switch to high resolution "
  573 + "mode on CPU %d\n", cpu);
571 574 return 0;
572 575 }
573 576 base->hres_active = 1;
kernel/time/tick-oneshot.c
... ... @@ -73,8 +73,21 @@
73 73 struct clock_event_device *dev = td->evtdev;
74 74  
75 75 if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||
76   - !tick_device_is_functional(dev))
  76 + !tick_device_is_functional(dev)) {
  77 +
  78 + printk(KERN_INFO "Clockevents: "
  79 + "could not switch to one-shot mode:");
  80 + if (!dev) {
  81 + printk(" no tick device\n");
  82 + } else {
  83 + if (!tick_device_is_functional(dev))
  84 + printk(" %s is not functional.\n", dev->name);
  85 + else
  86 + printk(" %s does not support one-shot mode.\n",
  87 + dev->name);
  88 + }
77 89 return -EINVAL;
  90 + }
78 91  
79 92 td->mode = TICKDEV_MODE_ONESHOT;
80 93 dev->event_handler = handler;