From 26e531652417518efd259ea1c5a46c9cc1fc3b60 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 4 May 1997 14:25:00 +0000 Subject: [PATCH] Don't remove i586_ctr_freq from scope, leave it defined as zero. This simplifies some assumptions and stops some code compile problems. This should fix the compile hiccup in PR#3491, but smp kernel profiling isn't likely to be fixed by this. --- sys/amd64/amd64/tsc.c | 8 +++++--- sys/amd64/include/clock.h | 8 +++++--- sys/amd64/isa/clock.c | 8 +++++--- sys/i386/i386/tsc.c | 8 +++++--- sys/i386/include/clock.h | 8 +++++--- sys/i386/isa/clock.c | 8 +++++--- sys/isa/atrtc.c | 8 +++++--- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index d46f982806bd..8f23285cbe3b 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.80 1997/04/06 13:25:48 mckay Exp $ + * $Id: clock.c,v 1.81 1997/04/26 11:45:51 peter Exp $ */ /* @@ -101,12 +101,14 @@ int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) u_int i586_ctr_bias; u_int i586_ctr_comultiplier; -u_int i586_ctr_freq; u_int i586_ctr_multiplier; #endif +u_int i586_ctr_freq; +#endif int statclock_disable; u_int stat_imask = SWI_CLOCK_MASK; #ifdef TIMER_FREQ diff --git a/sys/amd64/include/clock.h b/sys/amd64/include/clock.h index df8a20c5e4e8..1c3383d0eb62 100644 --- a/sys/amd64/include/clock.h +++ b/sys/amd64/include/clock.h @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $Id: clock.h,v 1.24 1997/02/22 09:33:59 peter Exp $ + * $Id: clock.h,v 1.25 1997/04/26 11:45:33 peter Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -28,12 +28,14 @@ */ extern int adjkerntz; extern int disable_rtc_set; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) extern u_int i586_ctr_bias; extern u_int i586_ctr_comultiplier; -extern u_int i586_ctr_freq; extern u_int i586_ctr_multiplier; #endif +extern u_int i586_ctr_freq; +#endif extern int statclock_disable; extern u_int timer_freq; extern int timer0_max_count; diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index d46f982806bd..8f23285cbe3b 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.80 1997/04/06 13:25:48 mckay Exp $ + * $Id: clock.c,v 1.81 1997/04/26 11:45:51 peter Exp $ */ /* @@ -101,12 +101,14 @@ int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) u_int i586_ctr_bias; u_int i586_ctr_comultiplier; -u_int i586_ctr_freq; u_int i586_ctr_multiplier; #endif +u_int i586_ctr_freq; +#endif int statclock_disable; u_int stat_imask = SWI_CLOCK_MASK; #ifdef TIMER_FREQ diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index d46f982806bd..8f23285cbe3b 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.80 1997/04/06 13:25:48 mckay Exp $ + * $Id: clock.c,v 1.81 1997/04/26 11:45:51 peter Exp $ */ /* @@ -101,12 +101,14 @@ int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) u_int i586_ctr_bias; u_int i586_ctr_comultiplier; -u_int i586_ctr_freq; u_int i586_ctr_multiplier; #endif +u_int i586_ctr_freq; +#endif int statclock_disable; u_int stat_imask = SWI_CLOCK_MASK; #ifdef TIMER_FREQ diff --git a/sys/i386/include/clock.h b/sys/i386/include/clock.h index df8a20c5e4e8..1c3383d0eb62 100644 --- a/sys/i386/include/clock.h +++ b/sys/i386/include/clock.h @@ -3,7 +3,7 @@ * Garrett Wollman, September 1994. * This file is in the public domain. * - * $Id: clock.h,v 1.24 1997/02/22 09:33:59 peter Exp $ + * $Id: clock.h,v 1.25 1997/04/26 11:45:33 peter Exp $ */ #ifndef _MACHINE_CLOCK_H_ @@ -28,12 +28,14 @@ */ extern int adjkerntz; extern int disable_rtc_set; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) extern u_int i586_ctr_bias; extern u_int i586_ctr_comultiplier; -extern u_int i586_ctr_freq; extern u_int i586_ctr_multiplier; #endif +extern u_int i586_ctr_freq; +#endif extern int statclock_disable; extern u_int timer_freq; extern int timer0_max_count; diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index d46f982806bd..8f23285cbe3b 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.80 1997/04/06 13:25:48 mckay Exp $ + * $Id: clock.c,v 1.81 1997/04/26 11:45:51 peter Exp $ */ /* @@ -101,12 +101,14 @@ int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) u_int i586_ctr_bias; u_int i586_ctr_comultiplier; -u_int i586_ctr_freq; u_int i586_ctr_multiplier; #endif +u_int i586_ctr_freq; +#endif int statclock_disable; u_int stat_imask = SWI_CLOCK_MASK; #ifdef TIMER_FREQ diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index d46f982806bd..8f23285cbe3b 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.80 1997/04/06 13:25:48 mckay Exp $ + * $Id: clock.c,v 1.81 1997/04/26 11:45:51 peter Exp $ */ /* @@ -101,12 +101,14 @@ int adjkerntz; /* local offset from GMT in seconds */ int disable_rtc_set; /* disable resettodr() if != 0 */ u_int idelayed; -#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) +#if defined(I586_CPU) || defined(I686_CPU) +#if !defined(SMP) u_int i586_ctr_bias; u_int i586_ctr_comultiplier; -u_int i586_ctr_freq; u_int i586_ctr_multiplier; #endif +u_int i586_ctr_freq; +#endif int statclock_disable; u_int stat_imask = SWI_CLOCK_MASK; #ifdef TIMER_FREQ