From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sat, 22 Jan 2011 08:46:20 +0100 Subject: [U-Boot] [PATCH v3] arm926ejs: timer: Replace bss variable by gdr In-Reply-To: <4D3A6D9B.8020503@ahsoftware.de> References: <1291973587-6718-1-git-send-email-hs@denx.de> <1295600199-3461-1-git-send-email-hs@denx.de> <4D3A6D9B.8020503@ahsoftware.de> Message-ID: <4D3A8B4C.5090701@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 22/01/2011 06:39, Alexander Holler a ?crit : > Hello, > > Am 21.01.2011 09:56, schrieb Heiko Schocher: > >> -static ulong timestamp; >> -static ulong lastdec; >> +DECLARE_GLOBAL_DATA_PTR; >> + >> +#define timestamp gd->tbl >> +#define lastdec gd->lastinc > > I'm the only one who doesn't like such defines? They might be handy for > quick fixes, but in regard to style and readablity I don't like them. > When looking at teh code where they will used, you won't see the actual > place where they are stored. And in more complex expression they might > become dangerous to use because they hide the operator "->". I accept the patch because it un-breaks support for ARM cpus, and I prefer a working fix to a perfect fix in this specific, transitional, situation. However a general rework of ARM timer code is in order so that all SoCs and CPUs share the same set of gd variables with the same names and the same logic; and when we get that, this code shall move along. About this rework, as the saying goes... "Patches Welcome ?". :) > Regards, > > Alexander Amicalement, -- Albert.