[U-Boot-Users] [PATCH] [ARM] Fix DECLARE_GLOBAL_DATA_PTR and make gd global

Dirk Behme dirk.behme at googlemail.com
Sat Sep 15 11:43:33 CEST 2007


Wolfgang Denk wrote:
> In message <46EB7145.1050307 at 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 


More information about the U-Boot mailing list