]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - kernel/hrtimer.c
highres: improve debug output
[net-next-2.6.git] / kernel / hrtimer.c
index 72d034258ba109b25b7a6f4723d47fd8f5cc5808..065a89786628c392f2525158288c3b3a493620cb 100644 (file)
@@ -558,7 +558,8 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer,
  */
 static int hrtimer_switch_to_hres(void)
 {
-       struct hrtimer_cpu_base *base = &__get_cpu_var(hrtimer_bases);
+       int cpu = smp_processor_id();
+       struct hrtimer_cpu_base *base = &per_cpu(hrtimer_bases, cpu);
        unsigned long flags;
 
        if (base->hres_active)
@@ -568,6 +569,8 @@ static int hrtimer_switch_to_hres(void)
 
        if (tick_init_highres()) {
                local_irq_restore(flags);
+               printk(KERN_WARNING "Could not switch to high resolution "
+                                   "mode on CPU %d\n", cpu);
                return 0;
        }
        base->hres_active = 1;