View | Details | Raw Unified | Return to bug 27627
Collapse All | Expand All

(-)clock.c Thu May 24 15:57:07 2001 (+10 lines)
Lines 140-145 Link Here
140
u_int  timer_freq = TIMER_FREQ;
140
u_int  timer_freq = TIMER_FREQ;
141
int    timer0_max_count;
141
int    timer0_max_count;
142
u_int  tsc_freq;
142
u_int  tsc_freq;
143
#ifdef CPUHZ
144
static u_int   cpuhz = 0;
145
#endif
143
int    tsc_is_broken;
146
int    tsc_is_broken;
144
int    wall_cmos_clock;        /* wall CMOS clock assumed if != 0 */
147
int    wall_cmos_clock;        /* wall CMOS clock assumed if != 0 */
145
148
Lines 661-666 Link Here
661
        * similar to those for the i8254 clock.
664
        * similar to those for the i8254 clock.
662
        */
665
        */
663
       if (tsc_present) 
666
       if (tsc_present) 
667
#ifdef CPUHZ
668
               cpuhz =
669
#endif
664
               tsc_freq = rdtsc() - old_tsc;
670
               tsc_freq = rdtsc() - old_tsc;
665
671
666
       if (bootverbose) {
672
       if (bootverbose) {
Lines 1164-1169 Link Here
1164
1170
1165
SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW,
1171
SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW,
1166
    0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", "");
1172
    0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", "");
1173
1174
#ifdef CPUHZ
1175
SYSCTL_INT(_hw, OID_AUTO, cpuhz, CTLFLAG_RD, &cpuhz, 0, "CPU speed in Hz.");
1176
#endif
1167
1177
1168
static int
1178
static int
1169
sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS)
1179
sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS)

Return to bug 27627