From 0d91c37ce56497f6aba1ecb07f25c6d71b355e09 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 14 Jun 2008 20:01:14 +0100 Subject: [legacy] Align legacy drivers' __shared data to the maximum possible Some drivers that still use the legacy-driver wrapper (tg3 in particular) apparently do not specify their alignment constraints properly. This hack forces any __shared data to be maximally aligned. Note that this provides only 16-byte alignment; it is not possible to request alignment to any greater than 16 bytes using __attribute__((aligned)), since the relocation code will preserve only 16 byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more that 16 byte alignment). Idea proposed by Tim Hockin --- src/include/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/compiler.h b/src/include/compiler.h index 1d4312a61..8ab7b8ae3 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -345,7 +345,7 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr, * @endcode * */ -#define __shared __asm__ ( "_shared_bss" ) +#define __shared __asm__ ( "_shared_bss" ) __aligned /** * Optimisation barrier -- cgit