From 088b22b70db4c2474e6d85ef5706d3f47926f6c7 Mon Sep 17 00:00:00 2001 From: nate Date: Sat, 23 Mar 1996 21:36:03 +0000 Subject: Whoops, back out the last commit, which was accidentally committed at the same time as the if_zp cleanup patch. The commit that occurred was an incomplete patch for APM on my laptop and needs more work. --- sys/amd64/amd64/tsc.c | 17 +---------------- sys/amd64/isa/clock.c | 17 +---------------- sys/i386/i386/tsc.c | 17 +---------------- sys/i386/isa/clock.c | 17 +---------------- sys/isa/atrtc.c | 17 +---------------- 5 files changed, 5 insertions(+), 80 deletions(-) diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index c7d7c72..d9ae373 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -101,11 +101,8 @@ long long i586_ctr_bias; long long i586_last_tick; unsigned long i586_avg_tick; #endif -#ifdef PROFILE u_int stat_imask = SWI_CLOCK_MASK; -#else int timer0_max_count; -#endif u_int timer0_overflow_threshold; u_int timer0_prescaler_count; @@ -238,7 +235,6 @@ release_timer2() return 0; } -#ifdef PROFILE /* * This routine receives statistical clock interrupts from the RTC. * As explained above, these occur at 128 interrupts per second. @@ -271,8 +267,7 @@ DDB_printrtc(void) rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); } -#endif /* DDB */ -#endif /* PROFILE */ +#endif static int getit(void) @@ -511,10 +506,8 @@ resettodr() tm = time.tv_sec; splx(s); -#ifdef PROFILE /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); -#endif /* Calculate local time to put in RTC */ @@ -550,10 +543,8 @@ resettodr() writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */ writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */ -#ifdef PROFILE /* Reenable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } /* @@ -564,10 +555,8 @@ cpu_initclocks() { int diag; -#ifdef PROFILE stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; -#endif /* Finish initializing 8253 timer 0. */ register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, @@ -590,23 +579,19 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#ifdef PROFILE register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); INTREN(IRQ8); writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } void setstatclockrate(int newhz) { -#ifdef PROFILE if (newhz == RTC_PROFRATE) rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; else rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); -#endif } diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index c7d7c72..d9ae373 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -101,11 +101,8 @@ long long i586_ctr_bias; long long i586_last_tick; unsigned long i586_avg_tick; #endif -#ifdef PROFILE u_int stat_imask = SWI_CLOCK_MASK; -#else int timer0_max_count; -#endif u_int timer0_overflow_threshold; u_int timer0_prescaler_count; @@ -238,7 +235,6 @@ release_timer2() return 0; } -#ifdef PROFILE /* * This routine receives statistical clock interrupts from the RTC. * As explained above, these occur at 128 interrupts per second. @@ -271,8 +267,7 @@ DDB_printrtc(void) rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); } -#endif /* DDB */ -#endif /* PROFILE */ +#endif static int getit(void) @@ -511,10 +506,8 @@ resettodr() tm = time.tv_sec; splx(s); -#ifdef PROFILE /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); -#endif /* Calculate local time to put in RTC */ @@ -550,10 +543,8 @@ resettodr() writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */ writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */ -#ifdef PROFILE /* Reenable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } /* @@ -564,10 +555,8 @@ cpu_initclocks() { int diag; -#ifdef PROFILE stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; -#endif /* Finish initializing 8253 timer 0. */ register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, @@ -590,23 +579,19 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#ifdef PROFILE register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); INTREN(IRQ8); writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } void setstatclockrate(int newhz) { -#ifdef PROFILE if (newhz == RTC_PROFRATE) rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; else rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); -#endif } diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index c7d7c72..d9ae373 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -101,11 +101,8 @@ long long i586_ctr_bias; long long i586_last_tick; unsigned long i586_avg_tick; #endif -#ifdef PROFILE u_int stat_imask = SWI_CLOCK_MASK; -#else int timer0_max_count; -#endif u_int timer0_overflow_threshold; u_int timer0_prescaler_count; @@ -238,7 +235,6 @@ release_timer2() return 0; } -#ifdef PROFILE /* * This routine receives statistical clock interrupts from the RTC. * As explained above, these occur at 128 interrupts per second. @@ -271,8 +267,7 @@ DDB_printrtc(void) rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); } -#endif /* DDB */ -#endif /* PROFILE */ +#endif static int getit(void) @@ -511,10 +506,8 @@ resettodr() tm = time.tv_sec; splx(s); -#ifdef PROFILE /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); -#endif /* Calculate local time to put in RTC */ @@ -550,10 +543,8 @@ resettodr() writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */ writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */ -#ifdef PROFILE /* Reenable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } /* @@ -564,10 +555,8 @@ cpu_initclocks() { int diag; -#ifdef PROFILE stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; -#endif /* Finish initializing 8253 timer 0. */ register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, @@ -590,23 +579,19 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#ifdef PROFILE register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); INTREN(IRQ8); writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } void setstatclockrate(int newhz) { -#ifdef PROFILE if (newhz == RTC_PROFRATE) rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; else rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); -#endif } diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index c7d7c72..d9ae373 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -101,11 +101,8 @@ long long i586_ctr_bias; long long i586_last_tick; unsigned long i586_avg_tick; #endif -#ifdef PROFILE u_int stat_imask = SWI_CLOCK_MASK; -#else int timer0_max_count; -#endif u_int timer0_overflow_threshold; u_int timer0_prescaler_count; @@ -238,7 +235,6 @@ release_timer2() return 0; } -#ifdef PROFILE /* * This routine receives statistical clock interrupts from the RTC. * As explained above, these occur at 128 interrupts per second. @@ -271,8 +267,7 @@ DDB_printrtc(void) rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); } -#endif /* DDB */ -#endif /* PROFILE */ +#endif static int getit(void) @@ -511,10 +506,8 @@ resettodr() tm = time.tv_sec; splx(s); -#ifdef PROFILE /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); -#endif /* Calculate local time to put in RTC */ @@ -550,10 +543,8 @@ resettodr() writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */ writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */ -#ifdef PROFILE /* Reenable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } /* @@ -564,10 +555,8 @@ cpu_initclocks() { int diag; -#ifdef PROFILE stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; -#endif /* Finish initializing 8253 timer 0. */ register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, @@ -590,23 +579,19 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#ifdef PROFILE register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); INTREN(IRQ8); writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } void setstatclockrate(int newhz) { -#ifdef PROFILE if (newhz == RTC_PROFRATE) rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; else rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); -#endif } diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index c7d7c72..d9ae373 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -101,11 +101,8 @@ long long i586_ctr_bias; long long i586_last_tick; unsigned long i586_avg_tick; #endif -#ifdef PROFILE u_int stat_imask = SWI_CLOCK_MASK; -#else int timer0_max_count; -#endif u_int timer0_overflow_threshold; u_int timer0_prescaler_count; @@ -238,7 +235,6 @@ release_timer2() return 0; } -#ifdef PROFILE /* * This routine receives statistical clock interrupts from the RTC. * As explained above, these occur at 128 interrupts per second. @@ -271,8 +267,7 @@ DDB_printrtc(void) rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC), rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR)); } -#endif /* DDB */ -#endif /* PROFILE */ +#endif static int getit(void) @@ -511,10 +506,8 @@ resettodr() tm = time.tv_sec; splx(s); -#ifdef PROFILE /* Disable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); -#endif /* Calculate local time to put in RTC */ @@ -550,10 +543,8 @@ resettodr() writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */ writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */ -#ifdef PROFILE /* Reenable RTC updates and interrupts. */ writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } /* @@ -564,10 +555,8 @@ cpu_initclocks() { int diag; -#ifdef PROFILE stathz = RTC_NOPROFRATE; profhz = RTC_PROFRATE; -#endif /* Finish initializing 8253 timer 0. */ register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0, @@ -590,23 +579,19 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#ifdef PROFILE register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0, /* XXX */ (inthand2_t *)rtcintr, &stat_imask, /* unit */ 0); INTREN(IRQ8); writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR); -#endif } void setstatclockrate(int newhz) { -#ifdef PROFILE if (newhz == RTC_PROFRATE) rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; else rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); -#endif } -- cgit v1.1