Commit fb31690f authored by Russell King's avatar Russell King Committed by Russell King

[ARM] Ensure machine information structures aren't optimised away

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 8a212ab6
...@@ -50,6 +50,7 @@ struct machine_desc { ...@@ -50,6 +50,7 @@ struct machine_desc {
*/ */
#define MACHINE_START(_type,_name) \ #define MACHINE_START(_type,_name) \
static const struct machine_desc __mach_desc_##_type \ static const struct machine_desc __mach_desc_##_type \
__attribute_used__ \
__attribute__((__section__(".arch.info.init"))) = { \ __attribute__((__section__(".arch.info.init"))) = { \
.nr = MACH_TYPE_##_type, \ .nr = MACH_TYPE_##_type, \
.name = _name, .name = _name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment