From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeroen Hofstee Date: Sat, 17 Aug 2013 15:51:37 +0200 Subject: [U-Boot] [PATCH v2 3/4] ARM: use r9 for gd In-Reply-To: <520F4514.1000804@myspectrum.nl> References: <1376254719-15594-1-git-send-email-jeroen@myspectrum.nl> <1376504746-15173-1-git-send-email-jeroen@myspectrum.nl> <1376504746-15173-4-git-send-email-jeroen@myspectrum.nl> <520F4514.1000804@myspectrum.nl> Message-ID: <520F7FE9.3000908@myspectrum.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/17/2013 11:40 AM, Jeroen Hofstee wrote: > On 08/14/2013 08:25 PM, Jeroen Hofstee wrote: >> To be more EABI compliant and as a preparation for building >> with clang, use the platform-specific r9 register for gd >> instead of r8. >> >> note: The FIQ is not updated since it is not used in u-boot, >> and under discussion for the time being. >> >> The following checkpatch warning is ignored: >> WARNING: Use of volatile is usually wrong: see >> Documentation/volatile-considered-harmful.txt >> >> cc: Albert ARIBAUD >> Signed-off-by: Jeroen Hofstee >> --- >> arch/arm/config.mk | 2 +- >> arch/arm/include/asm/global_data.h | 2 +- >> arch/arm/lib/crt0.S | 16 ++++++++-------- >> 3 files changed, 10 insertions(+), 10 deletions(-) >> > > This patch assumes only crt0.S sets the register used for > gd in asm. I just noticed cpu/armv7/lowlevel_init.S does set gd > manually, so all users of the common board.c are likely > bricked with the patch as is. Looking into it.... Looking into this, it seems lowlevel_init.S could simply be removed by placing the call to s_init at a better spot. As Tom pointed out, this is already being discussed at [1]. As that is a topic of its own I intend to simply change lowlevel_init.S to us r9 in this patchset. Regards, Jeroen [1] http://u-boot.10912.n7.nabble.com/PATCH-1-3-arm-spl-Fix-SPL-booting-for-OMAP3-td156990.html