Remove lapic_timer_test
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 14 May 2009 11:14:55 +0000 (19:14 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 14 May 2009 11:37:12 +0000 (19:37 +0800)
sys/platform/pc32/apic/mpapic.c
sys/platform/pc32/isa/clock.c

index c5273a1..983b5a5 100644 (file)
@@ -55,10 +55,8 @@ void         lapic_timer_intr_test(void);
 void           lapic_timer_oneshot_intr_enable(void);
 void           lapic_timer_restart(void);
 
-int            lapic_timer_test;
 int            lapic_timer_enable;
 
-TUNABLE_INT("hw.lapic_timer_test", &lapic_timer_test);
 TUNABLE_INT("hw.lapic_timer_enable", &lapic_timer_enable);
 
 /*
@@ -249,27 +247,13 @@ lapic_timer_process_oncpu(struct globaldata *gd, struct intrframe *frame)
 void
 lapic_timer_process(void)
 {
-       struct globaldata *gd = mycpu;
-
-       if (__predict_false(lapic_timer_test)) {
-               gd->gd_timer_running = 0;
-               kprintf("%d proc\n", gd->gd_cpuid);
-       } else {
-               lapic_timer_process_oncpu(gd, NULL);
-       }
+       lapic_timer_process_oncpu(mycpu, NULL);
 }
 
 void
 lapic_timer_process_frame(struct intrframe *frame)
 {
-       struct globaldata *gd = mycpu;
-
-       if (__predict_false(lapic_timer_test)) {
-               gd->gd_timer_running = 0;
-               kprintf("%d proc frame\n", gd->gd_cpuid);
-       } else {
-               lapic_timer_process_oncpu(gd, frame);
-       }
+       lapic_timer_process_oncpu(mycpu, frame);
 }
 
 void
@@ -384,7 +368,7 @@ lapic_timer_restart_handler(void *dummy __unused)
 void
 lapic_timer_fixup(void)
 {
-       if (lapic_timer_test || lapic_timer_enable) {
+       if (lapic_timer_enable) {
                lwkt_send_ipiq_mask(smp_active_mask,
                                    lapic_timer_fixup_handler, NULL);
        }
index 243961b..8ba1e12 100644 (file)
@@ -369,32 +369,19 @@ i8254_intr_reload(sysclock_t reload)
 
 #ifdef SMP
 
-extern int     lapic_timer_test;
 extern int     lapic_timer_enable;
 extern void    lapic_timer_oneshot_intr_enable(void);
 extern void    lapic_timer_intr_test(void);
 extern void    lapic_timer_restart(void);
 
-/* Piggyback lapic_timer test */
-static void
-i8254_intr_reload_test(sysclock_t reload)
-{
-       i8254_intr_reload(reload);
-       if (__predict_false(lapic_timer_test))
-               lapic_timer_intr_test();
-}
-
 #endif /* SMP */
 
 void
 cputimer_intr_enable(void)
 {
 #ifdef SMP
-       if (lapic_timer_test || lapic_timer_enable) {
+       if (lapic_timer_enable)
                lapic_timer_oneshot_intr_enable();
-               if (lapic_timer_test) /* XXX */
-                       cputimer_intr_reload = i8254_intr_reload_test;
-       }
 #endif
 }
 
@@ -402,8 +389,7 @@ void
 cputimer_intr_switch(enum cputimer_intr_type type)
 {
 #ifdef SMP
-       if (!i8254_intr_disable &&
-           (lapic_timer_enable || lapic_timer_test)) {
+       if (!i8254_intr_disable && lapic_timer_enable) {
                switch (type) {
                case CPUTIMER_INTRT_C3:
                        cputimer_intr_reload = i8254_intr_reload;
@@ -412,10 +398,7 @@ cputimer_intr_switch(enum cputimer_intr_type type)
                        break;
 
                case CPUTIMER_INTRT_FAST:
-                       if (lapic_timer_test) /* XXX */
-                               cputimer_intr_reload = i8254_intr_reload_test;
-                       else if (lapic_timer_enable)
-                               lapic_timer_restart();
+                       lapic_timer_restart();
                        break;
                }
        }