diff options
author | jkim <jkim@FreeBSD.org> | 2011-06-08 23:44:59 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2011-06-08 23:44:59 +0000 |
commit | 9c58536b5203ba9b57d6b23500e1b33992f43309 (patch) | |
tree | 6f97f8dff8ace7311f5bfae426776a1a04726b89 | |
parent | 06eea88ad1f9f7ec161bcfe6be44a8729e22419c (diff) | |
download | FreeBSD-src-9c58536b5203ba9b57d6b23500e1b33992f43309.zip FreeBSD-src-9c58536b5203ba9b57d6b23500e1b33992f43309.tar.gz |
Tidy up r222866.
- Re-add accidentally removed atomic op. for sysctl(9) handler.
- Remove a period(`.') at the end of a debugging message.
- Consistently spell "low" for "TSC-low" timecounter throughout.
Pointed out by: bde
-rw-r--r-- | sys/x86/x86/tsc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index c21906e..70c176a 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -80,7 +80,7 @@ static void tsc_freq_changed(void *arg, const struct cf_level *level, static void tsc_freq_changing(void *arg, const struct cf_level *level, int *status); static unsigned tsc_get_timecount(struct timecounter *tc); -static unsigned tsc_get_timecount_lowres(struct timecounter *tc); +static unsigned tsc_get_timecount_low(struct timecounter *tc); static void tsc_levels_changed(void *arg, int unit); static struct timecounter tsc_timecounter = { @@ -464,10 +464,10 @@ init: for (shift = 0; shift < 32 && (tsc_freq >> shift) > max_freq; shift++) ; if (shift > 0) { - tsc_timecounter.tc_get_timecount = tsc_get_timecount_lowres; + tsc_timecounter.tc_get_timecount = tsc_get_timecount_low; tsc_timecounter.tc_name = "TSC-low"; if (bootverbose) - printf("TSC timecounter discards lower %d bit(s).\n", + printf("TSC timecounter discards lower %d bit(s)\n", shift); } if (tsc_freq != 0) { @@ -560,8 +560,8 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) error = sysctl_handle_64(oidp, &freq, 0, req); if (error == 0 && req->newptr != NULL) { atomic_store_rel_64(&tsc_freq, freq); - tsc_timecounter.tc_frequency = - freq >> (int)(intptr_t)tsc_timecounter.tc_priv; + atomic_store_rel_64(&tsc_timecounter.tc_frequency, + freq >> (int)(intptr_t)tsc_timecounter.tc_priv); } return (error); } @@ -577,7 +577,7 @@ tsc_get_timecount(struct timecounter *tc __unused) } static u_int -tsc_get_timecount_lowres(struct timecounter *tc) +tsc_get_timecount_low(struct timecounter *tc) { return (rdtsc() >> (int)(intptr_t)tc->tc_priv); |