From 7e2d76ff05e8e26ccb133c7985b5fdfd3dae98eb Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 26 Apr 2002 10:06:26 +0000 Subject: [PATCH] Remove the tc_update() function. Any frequency change to the timecounter will be used starting at the next second, which is good enough for sysctl purposes. If better adjustment is needed the NTP PLL should be used. --- sys/amd64/amd64/tsc.c | 2 -- sys/amd64/isa/clock.c | 2 -- sys/dev/acpica/acpi_timer.c | 1 - sys/i386/i386/mp_clock.c | 1 - sys/i386/i386/tsc.c | 2 -- sys/i386/isa/clock.c | 2 -- sys/isa/atrtc.c | 2 -- sys/kern/kern_tc.c | 6 ------ sys/pc98/cbus/clock.c | 2 -- sys/pc98/cbus/pcrtc.c | 2 -- sys/pc98/pc98/clock.c | 2 -- sys/sys/timetc.h | 1 - 12 files changed, 25 deletions(-) diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 810fbe7ead7..560da54cfea 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -1204,7 +1204,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1225,7 +1224,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 810fbe7ead7..560da54cfea 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -1204,7 +1204,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1225,7 +1224,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c index e9c47fa7414..8887f13d6d8 100644 --- a/sys/dev/acpica/acpi_timer.c +++ b/sys/dev/acpica/acpi_timer.c @@ -248,7 +248,6 @@ acpi_timer_sysctl_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { acpi_timer_frequency = freq; acpi_timer_timecounter.tc_frequency = acpi_timer_frequency; - tc_update(&acpi_timer_timecounter); } return (error); } diff --git a/sys/i386/i386/mp_clock.c b/sys/i386/i386/mp_clock.c index 42be2081c5e..1c7388f96bb 100644 --- a/sys/i386/i386/mp_clock.c +++ b/sys/i386/i386/mp_clock.c @@ -74,7 +74,6 @@ sysctl_machdep_piix_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { piix_freq = freq; piix_timecounter.tc_frequency = piix_freq; - tc_update(&piix_timecounter); } return (error); } diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 810fbe7ead7..560da54cfea 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -1204,7 +1204,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1225,7 +1224,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 810fbe7ead7..560da54cfea 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -1204,7 +1204,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1225,7 +1224,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 810fbe7ead7..560da54cfea 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -1204,7 +1204,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1225,7 +1224,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 18e3ce388f4..8a5bd2cee71 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -247,12 +247,6 @@ tco_setscales(struct timecounter *tc) tc->tc_scale = scale * 2; } -void -tc_update(struct timecounter *tc) -{ - tco_setscales(tc); -} - void tc_init(struct timecounter *tc) { diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c index b70465ab388..92843629ebd 100644 --- a/sys/pc98/cbus/clock.c +++ b/sys/pc98/cbus/clock.c @@ -1554,7 +1554,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1575,7 +1574,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c index b70465ab388..92843629ebd 100644 --- a/sys/pc98/cbus/pcrtc.c +++ b/sys/pc98/cbus/pcrtc.c @@ -1554,7 +1554,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1575,7 +1574,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/pc98/pc98/clock.c b/sys/pc98/pc98/clock.c index b70465ab388..92843629ebd 100644 --- a/sys/pc98/pc98/clock.c +++ b/sys/pc98/pc98/clock.c @@ -1554,7 +1554,6 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) return (EBUSY); /* too much trouble to handle */ set_timer_freq(freq, hz); i8254_timecounter.tc_frequency = freq; - tc_update(&i8254_timecounter); } return (error); } @@ -1575,7 +1574,6 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr != NULL) { tsc_freq = freq; tsc_timecounter.tc_frequency = tsc_freq; - tc_update(&tsc_timecounter); } return (error); } diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h index 151cfd61bb2..efee90743ba 100644 --- a/sys/sys/timetc.h +++ b/sys/sys/timetc.h @@ -96,7 +96,6 @@ extern struct timecounter *volatile timecounter; void tc_init(struct timecounter *tc); void tc_setclock(struct timespec *ts); void tc_windup(void); -void tc_update(struct timecounter *tc); #endif /* !_KERNEL */ #endif /* !_SYS_TIMETC_H_ */