From: Wolfgang Denk Date: Thu, 04 Nov 2010 22:26:53 +0100 Subject: [U-Boot] [PATCH] omap4: board: change global data pointer to file scope In-Reply-To: References: <1288037639-20704-1-git-send-email-nm@ti.com> Message-ID: <20101104212653.628A412A81E3@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 Dear "Menon, Nishanth", In message you wrote: > On Mon, Oct 25, 2010 at 16:13, Menon, Nishanth wrote: > > DECLARE_GLOBAL_DATA_PTR is currently defined within the scope > > of function while it is a global pointer. Change the scope of > > definition to replicate it's global scope. This seems to help > > gcc 4.5 optimizations as well. > > > > Signed-off-by: Nishanth Menon > > gentle ping - I dont see comments on this, is it ok to pull this in? This is OK. The use of DECLARE_GLOBAL_DATA_PTR at function scope (instead file scope) is known to cause incorrect code in some compiler / architecture versions. We consider it a bug. 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 you want strict real-time behavior, run in the real time schedu- ling class. But there are no seatbelts or airbags; main(){for(;;);} can hard hang your system. -- Bart Smaalders