Date: Wed, 8 Jun 2011 23:44:59 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222884 - head/sys/x86/x86 Message-ID: <201106082344.p58NixUl052580@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Jun 8 23:44:59 2011 New Revision: 222884 URL: http://svn.freebsd.org/changeset/base/222884 Log: 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 Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Wed Jun 8 21:59:07 2011 (r222883) +++ head/sys/x86/x86/tsc.c Wed Jun 8 23:44:59 2011 (r222884) @@ -80,7 +80,7 @@ static void tsc_freq_changed(void *arg, 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_A 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 } 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106082344.p58NixUl052580>