From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Sat, 15 Sep 2007 11:43:33 +0200 Subject: [U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global In-Reply-To: <20070915074303.0DFC024669@gemini.denx.de> References: <20070915074303.0DFC024669@gemini.denx.de> Message-ID: <46EBA945.30009@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <46EB7145.1050307@googlemail.com> you wrote: > >>Some users [1] with (some?) ARM toolchains report issues with >>#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r8") >>in include/asm-arm/global_data.h >>The issue seems to be [2] > > Can you please point out specific boards that show this problem? [1] was on unknown board with CodeSourcery ARM toolchain 2006q1-3 [2] was on TI DaVinci board with MontaVista ARM toolchain 3.4.3-25.0.104.0600975 2006-07-06 >>This patch makes DECLARE_GLOBAL_DATA_PTR empty, so no local register >>variable any more, and makes gd global. > > Actually this should not be needed any more as all use of the > DECLARE_GLOBAL_DATA_PTR (should) have been moved outside function > bodies, so we already use a global definition. If there are remaining > places where this has been forgotten I'd rather fix these. Thanks for the hint! I scanned for in-function DECLARE_GLOBAL_DATA_PTR and got following files ./cpu/bf537/i2c.c ./cpu/bf537/serial.c ./cpu/bf561/serial.c ./cpu/mcf532x/cpu.c ./cpu/mcf532x/speed.c ./cpu/mpc86xx/cpu_init.c ./cpu/mpc86xx/speed.c ./cpu/mpc86xx/traps.c ./cpu/arm720t/serial.c ./lib_blackfin/post.c. ./lib_blackfin/board.c ./board/mpl/vcma9/cmd_vcma9.c ./board/amcc/yucca/yucca.c ./board/amcc/taishan/taishan.c ./board/amcc/katmai/katmai.c ./board/davinci/schmoogie/dv_board.c ./board/davinci/dv-evm/dv_board.c ./board/davinci/sonata/dv_board.c ./board/sbc2410x/sbc2410x.c ./board/bf561-ezkit/bf561-ezkit.c ./board/bf537-stamp/bf537-stamp.c ./board/mpc7448hpc2/tsi108_init.c ./board/mpc7448hpc2/mpc7448hpc2.c ./board/siemens/SMN42/smn42.c ./board/freescale/mpc8313erdb/sdram.c ./board/bf533-ezkit/bf533-ezkit.c ./board/bf533-stamp/bf533-stamp.c ./board/lpc2292sodimm/lpc2292sodimm.c ./drivers/qe/qe.c See below as well. Patch for DaVinci follows. Cheers Dirk [1] http://www.codesourcery.com/archives/arm-gnu/msg00736.html [2] http://linux.omap.com/pipermail/davinci-linux-open-source/2007-September/004068.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: function_local_global_data_ptr.txt Url: http://lists.denx.de/pipermail/u-boot/attachments/20070915/e22839a3/attachment.txt