clock.h (12724) | clock.h (13000) |
---|---|
1/* 2 * Kernel interface to machine-dependent clock driver. 3 * Garrett Wollman, September 1994. 4 * This file is in the public domain. 5 * | 1/* 2 * Kernel interface to machine-dependent clock driver. 3 * Garrett Wollman, September 1994. 4 * This file is in the public domain. 5 * |
6 * $Id: clock.h,v 1.6 1995/11/29 19:57:16 wollman Exp $ | 6 * $Id: clock.h,v 1.7 1995/12/10 13:38:07 phk Exp $ |
7 */ 8 9#ifndef _MACHINE_CLOCK_H_ 10#define _MACHINE_CLOCK_H_ 11 | 7 */ 8 9#ifndef _MACHINE_CLOCK_H_ 10#define _MACHINE_CLOCK_H_ 11 |
12#ifdef I586_CPU | 12#if defined(I586_CPU) || defined(I686_CPU) |
13 14#define I586_CYCLECTR(x) \ 15 __asm __volatile(".byte 0x0f, 0x31" : "=A" (x)) 16 17/* 18 * When we update the clock, we also update this bias value which is 19 * automatically subtracted in microtime(). We assume that CPU_THISTICKLEN() 20 * has been called at some point in the past, so that an appropriate value is --- 28 unchanged lines hidden (view full) --- 49 50/* 51 * i386 to clock driver interface. 52 * XXX almost all of it is misplaced. i586 stuff is done in isa/clock.c 53 * and isa stuff is done in i386/microtime.s and i386/support.s. 54 */ 55extern int adjkerntz; 56extern int disable_rtc_set; | 13 14#define I586_CYCLECTR(x) \ 15 __asm __volatile(".byte 0x0f, 0x31" : "=A" (x)) 16 17/* 18 * When we update the clock, we also update this bias value which is 19 * automatically subtracted in microtime(). We assume that CPU_THISTICKLEN() 20 * has been called at some point in the past, so that an appropriate value is --- 28 unchanged lines hidden (view full) --- 49 50/* 51 * i386 to clock driver interface. 52 * XXX almost all of it is misplaced. i586 stuff is done in isa/clock.c 53 * and isa stuff is done in i386/microtime.s and i386/support.s. 54 */ 55extern int adjkerntz; 56extern int disable_rtc_set; |
57#ifdef I586_CPU | 57#if defined(I586_CPU) || defined(I686_CPU) |
58extern unsigned i586_ctr_rate; /* fixed point */ 59extern long long i586_last_tick; 60extern long long i586_ctr_bias; 61#endif 62extern int timer0_max_count; 63extern u_int timer0_overflow_threshold; 64extern u_int timer0_prescaler_count; 65 | 58extern unsigned i586_ctr_rate; /* fixed point */ 59extern long long i586_last_tick; 60extern long long i586_ctr_bias; 61#endif 62extern int timer0_max_count; 63extern u_int timer0_overflow_threshold; 64extern u_int timer0_prescaler_count; 65 |
66#ifdef I586_CPU | 66#if defined(I586_CPU) || defined(I686_CPU) |
67void calibrate_cyclecounter __P((void)); 68#endif 69 | 67void calibrate_cyclecounter __P((void)); 68#endif 69 |
70#ifdef I586_CPU | 70#if defined(I586_CPU) || defined(I686_CPU) |
71static __inline u_long 72cpu_thisticklen(u_long dflt) 73{ 74 long long old; 75 long rv; 76 77 if (i586_ctr_rate) { 78 old = i586_last_tick; --- 24 unchanged lines hidden --- | 71static __inline u_long 72cpu_thisticklen(u_long dflt) 73{ 74 long long old; 75 long rv; 76 77 if (i586_ctr_rate) { 78 old = i586_last_tick; --- 24 unchanged lines hidden --- |