Date: Fri, 3 Dec 2010 13:56:29 -0800 From: mdf@FreeBSD.org To: Jung-uk Kim <jkim@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r216161 - in head/sys: amd64/amd64 i386/i386 Message-ID: <AANLkTi=mFhQQd8%2BseT4mi7yPw%2Bz9tunpMd4rVrUoyO7x@mail.gmail.com> In-Reply-To: <201012032154.oB3LsADC035461@svn.freebsd.org> References: <201012032154.oB3LsADC035461@svn.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Fri, Dec 3, 2010 at 1:54 PM, Jung-uk Kim <jkim@freebsd.org> wrote: > Author: jkim > Date: Fri Dec 3 21:54:10 2010 > New Revision: 216161 > URL: http://svn.freebsd.org/changeset/base/216161 > > Log: > Explicitly initialize TSC frequency. To calibrate TSC frequency, we use > DELAY(9) and it may use TSC in turn if TSC frequency is non-zero. Doesn't ELF guarantee that the static data is already 0? On AIX the kernel had to explicitly zero the non-initialized data area, but AIX uses the a.out format. I thought FreeBSD/ELF meant that global variables without initializers were 0 by the time the OS started running. Thanks, matthew > > MFC after: 3 days > > Modified: > head/sys/amd64/amd64/tsc.c > head/sys/i386/i386/tsc.c > > Modified: head/sys/amd64/amd64/tsc.c > ============================================================================== > --- head/sys/amd64/amd64/tsc.c Fri Dec 3 21:52:01 2010 (r216160) > +++ head/sys/amd64/amd64/tsc.c Fri Dec 3 21:54:10 2010 (r216161) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > #include "cpufreq_if.h" > > -uint64_t tsc_freq; > +uint64_t tsc_freq = 0; > int tsc_is_broken; > int tsc_is_invariant; > static eventhandler_tag tsc_levels_tag, tsc_pre_tag, tsc_post_tag; > > Modified: head/sys/i386/i386/tsc.c > ============================================================================== > --- head/sys/i386/i386/tsc.c Fri Dec 3 21:52:01 2010 (r216160) > +++ head/sys/i386/i386/tsc.c Fri Dec 3 21:54:10 2010 (r216161) > @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); > > #include "cpufreq_if.h" > > -uint64_t tsc_freq; > +uint64_t tsc_freq = 0; > int tsc_is_broken; > int tsc_is_invariant; > u_int tsc_present; >help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=mFhQQd8%2BseT4mi7yPw%2Bz9tunpMd4rVrUoyO7x>
