]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] Ensure machine information structures aren't optimised away
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sat, 29 Oct 2005 12:15:10 +0000 (13:15 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 29 Oct 2005 12:15:10 +0000 (13:15 +0100)
Since the machine information structures are now static, the
compiler might optimise them away.  Mark them with
__attribute_used__ to prevent this occuring.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/mach/arch.h

index 7273c6fd95b53d39a3bae2e882c134e789030fcb..eb262e078c46edf4c126e635e4279bb73437630d 100644 (file)
@@ -50,6 +50,7 @@ struct machine_desc {
  */
 #define MACHINE_START(_type,_name)                     \
 static const struct machine_desc __mach_desc_##_type   \
+ __attribute_used__                                    \
  __attribute__((__section__(".arch.info.init"))) = {   \
        .nr             = MACH_TYPE_##_type,            \
        .name           = _name,