vmlinuz.lds: define OF table sections with macros

OF table sections all have the same pattern, so create a macro to define
them and insure consistency.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Rob Herring 2014-03-24 16:59:20 -05:00
parent 9a721c4111
commit 0630928830
1 changed files with 13 additions and 43 deletions

View File

@ -139,52 +139,22 @@
#define TRACE_SYSCALLS() #define TRACE_SYSCALLS()
#endif #endif
#ifdef CONFIG_CLKSRC_OF
#define CLKSRC_OF_TABLES() . = ALIGN(8); \
VMLINUX_SYMBOL(__clksrc_of_table) = .; \
*(__clksrc_of_table) \
*(__clksrc_of_table_end)
#else
#define CLKSRC_OF_TABLES()
#endif
#ifdef CONFIG_IRQCHIP #define ___OF_TABLE(cfg, name) _OF_TABLE_##cfg(name)
#define IRQCHIP_OF_MATCH_TABLE() \ #define __OF_TABLE(cfg, name) ___OF_TABLE(cfg, name)
#define OF_TABLE(cfg, name) __OF_TABLE(config_enabled(cfg), name)
#define _OF_TABLE_0(name)
#define _OF_TABLE_1(name) \
. = ALIGN(8); \ . = ALIGN(8); \
VMLINUX_SYMBOL(__irqchip_of_table) = .; \ VMLINUX_SYMBOL(__##name##_of_table) = .; \
*(__irqchip_of_table) \ *(__##name##_of_table) \
*(__irqchip_of_table_end) *(__##name##_of_table_end)
#else
#define IRQCHIP_OF_MATCH_TABLE()
#endif
#ifdef CONFIG_COMMON_CLK #define CLKSRC_OF_TABLES() OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
#define CLK_OF_TABLES() . = ALIGN(8); \ #define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
VMLINUX_SYMBOL(__clk_of_table) = .; \ #define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk)
*(__clk_of_table) \ #define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem)
*(__clk_of_table_end) #define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
#else
#define CLK_OF_TABLES()
#endif
#ifdef CONFIG_OF_RESERVED_MEM
#define RESERVEDMEM_OF_TABLES() \
. = ALIGN(8); \
VMLINUX_SYMBOL(__reservedmem_of_table) = .; \
*(__reservedmem_of_table) \
*(__reservedmem_of_table_end)
#else
#define RESERVEDMEM_OF_TABLES()
#endif
#ifdef CONFIG_SMP
#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
VMLINUX_SYMBOL(__cpu_method_of_table) = .; \
*(__cpu_method_of_table) \
*(__cpu_method_of_table_end)
#else
#define CPU_METHOD_OF_TABLES()
#endif
#define KERNEL_DTB() \ #define KERNEL_DTB() \
STRUCT_ALIGN(); \ STRUCT_ALIGN(); \