From: Wolfgang Denk Date: Sat, 24 May 2008 21:59:11 +0200 Subject: [U-Boot-Users] [PATCH 3/3][MIPS] lib_mips/time.c: Fix improper use of CFG_HZ and timer routines In-Reply-To: Your message of "Sat, 24 May 2008 22:02:28 +0900." <483811E4.3070209@ruby.dti.ne.jp> Message-ID: <20080524195911.559B7247F5@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <483811E4.3070209@ruby.dti.ne.jp> you wrote: > > This patch adds 3 global variables; timestamp, cycles_per_jiffy, expirelo. > timestamp is a 32-bit non-overflowing CFG_HZ counter. cycles_per_jiffy is > calculated counter cycles in a CFG_HZ. And expirelo holds the count value > for next CPU timer expiration. Be careful - keep in mind that variables in the data segment will be read-only before relocation to RAM, and variables in BSS will be uninitialized *and* get overwritten with zero when the BSS gets initialized. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If a group of N persons implements a COBOL compiler, there will be N-1 passes. Someone in the group has to be the manager. - T. Cheatham