diff options
-rw-r--r-- | sys/amd64/amd64/tsc.c | 7 | ||||
-rw-r--r-- | sys/amd64/include/cpu.h | 5 | ||||
-rw-r--r-- | sys/amd64/isa/clock.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/tsc.c | 7 | ||||
-rw-r--r-- | sys/i386/include/cpu.h | 5 | ||||
-rw-r--r-- | sys/i386/isa/clock.c | 7 | ||||
-rw-r--r-- | sys/isa/atrtc.c | 7 |
7 files changed, 7 insertions, 38 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 5edd84b..7d8edac 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -139,6 +139,7 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; int tsc_is_broken; +u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ struct mtx clock_lock; @@ -169,12 +170,6 @@ static u_int timer0_prescaler_count; static u_char timer0_state; static u_char timer2_state; static void (*timer_func) __P((struct clockframe *frame)) = hardclock; -#if defined(I386_CPU) || defined(I486_CPU) - u_int tsc_present; /* Not static; other parts of the kernel - * Need to know this */ -#else -static u_int tsc_present; -#endif static unsigned i8254_get_timecount __P((struct timecounter *tc)); static unsigned tsc_get_timecount __P((struct timecounter *tc)); diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index e644b50..9ecc87a 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -105,13 +105,10 @@ #ifdef _KERNEL extern char btext[]; extern char etext[]; +extern u_int tsc_present; void fork_trampoline __P((void)); -#if defined(I386_CPU) || defined(I486_CPU) -extern u_int tsc_present; -#endif - /* * Return contents of in-cpu fast counter as a sort of "bogo-time" * for non-critical timing. diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 5edd84b..7d8edac 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -139,6 +139,7 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; int tsc_is_broken; +u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ struct mtx clock_lock; @@ -169,12 +170,6 @@ static u_int timer0_prescaler_count; static u_char timer0_state; static u_char timer2_state; static void (*timer_func) __P((struct clockframe *frame)) = hardclock; -#if defined(I386_CPU) || defined(I486_CPU) - u_int tsc_present; /* Not static; other parts of the kernel - * Need to know this */ -#else -static u_int tsc_present; -#endif static unsigned i8254_get_timecount __P((struct timecounter *tc)); static unsigned tsc_get_timecount __P((struct timecounter *tc)); diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 5edd84b..7d8edac 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -139,6 +139,7 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; int tsc_is_broken; +u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ struct mtx clock_lock; @@ -169,12 +170,6 @@ static u_int timer0_prescaler_count; static u_char timer0_state; static u_char timer2_state; static void (*timer_func) __P((struct clockframe *frame)) = hardclock; -#if defined(I386_CPU) || defined(I486_CPU) - u_int tsc_present; /* Not static; other parts of the kernel - * Need to know this */ -#else -static u_int tsc_present; -#endif static unsigned i8254_get_timecount __P((struct timecounter *tc)); static unsigned tsc_get_timecount __P((struct timecounter *tc)); diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index e644b50..9ecc87a 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -105,13 +105,10 @@ #ifdef _KERNEL extern char btext[]; extern char etext[]; +extern u_int tsc_present; void fork_trampoline __P((void)); -#if defined(I386_CPU) || defined(I486_CPU) -extern u_int tsc_present; -#endif - /* * Return contents of in-cpu fast counter as a sort of "bogo-time" * for non-critical timing. diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 5edd84b..7d8edac 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -139,6 +139,7 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; int tsc_is_broken; +u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ struct mtx clock_lock; @@ -169,12 +170,6 @@ static u_int timer0_prescaler_count; static u_char timer0_state; static u_char timer2_state; static void (*timer_func) __P((struct clockframe *frame)) = hardclock; -#if defined(I386_CPU) || defined(I486_CPU) - u_int tsc_present; /* Not static; other parts of the kernel - * Need to know this */ -#else -static u_int tsc_present; -#endif static unsigned i8254_get_timecount __P((struct timecounter *tc)); static unsigned tsc_get_timecount __P((struct timecounter *tc)); diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 5edd84b..7d8edac 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -139,6 +139,7 @@ u_int timer_freq = TIMER_FREQ; int timer0_max_count; u_int tsc_freq; int tsc_is_broken; +u_int tsc_present; int wall_cmos_clock; /* wall CMOS clock assumed if != 0 */ struct mtx clock_lock; @@ -169,12 +170,6 @@ static u_int timer0_prescaler_count; static u_char timer0_state; static u_char timer2_state; static void (*timer_func) __P((struct clockframe *frame)) = hardclock; -#if defined(I386_CPU) || defined(I486_CPU) - u_int tsc_present; /* Not static; other parts of the kernel - * Need to know this */ -#else -static u_int tsc_present; -#endif static unsigned i8254_get_timecount __P((struct timecounter *tc)); static unsigned tsc_get_timecount __P((struct timecounter *tc)); |