aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-03-24 17:59:20 -0400
committerRob Herring <robh@kernel.org>2014-05-20 15:24:41 -0400
commit063092883039e49e5edc1f63133dc5ad437361a2 (patch)
treee1defd133d350616e48cdf4544bdf9bee1d7bd26 /include/asm-generic
parent9a721c41113a50ccbe184d67a5e551feb99e36a9 (diff)
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>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/vmlinux.lds.h58
1 files changed, 14 insertions, 44 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fe57c5f1bd1a..b9404f6590f1 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,52 +139,22 @@
139#define TRACE_SYSCALLS() 139#define TRACE_SYSCALLS()
140#endif 140#endif
141 141
142#ifdef CONFIG_CLKSRC_OF
143#define CLKSRC_OF_TABLES() . = ALIGN(8); \
144 VMLINUX_SYMBOL(__clksrc_of_table) = .; \
145 *(__clksrc_of_table) \
146 *(__clksrc_of_table_end)
147#else
148#define CLKSRC_OF_TABLES()
149#endif
150 142
151#ifdef CONFIG_IRQCHIP 143#define ___OF_TABLE(cfg, name) _OF_TABLE_##cfg(name)
152#define IRQCHIP_OF_MATCH_TABLE() \ 144#define __OF_TABLE(cfg, name) ___OF_TABLE(cfg, name)
145#define OF_TABLE(cfg, name) __OF_TABLE(config_enabled(cfg), name)
146#define _OF_TABLE_0(name)
147#define _OF_TABLE_1(name) \
153 . = ALIGN(8); \ 148 . = ALIGN(8); \
154 VMLINUX_SYMBOL(__irqchip_of_table) = .; \ 149 VMLINUX_SYMBOL(__##name##_of_table) = .; \
155 *(__irqchip_of_table) \ 150 *(__##name##_of_table) \
156 *(__irqchip_of_table_end) 151 *(__##name##_of_table_end)
157#else 152
158#define IRQCHIP_OF_MATCH_TABLE() 153#define CLKSRC_OF_TABLES() OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
159#endif 154#define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
160 155#define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk)
161#ifdef CONFIG_COMMON_CLK 156#define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem)
162#define CLK_OF_TABLES() . = ALIGN(8); \ 157#define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
163 VMLINUX_SYMBOL(__clk_of_table) = .; \
164 *(__clk_of_table) \
165 *(__clk_of_table_end)
166#else
167#define CLK_OF_TABLES()
168#endif
169
170#ifdef CONFIG_OF_RESERVED_MEM
171#define RESERVEDMEM_OF_TABLES() \
172 . = ALIGN(8); \
173 VMLINUX_SYMBOL(__reservedmem_of_table) = .; \
174 *(__reservedmem_of_table) \
175 *(__reservedmem_of_table_end)
176#else
177#define RESERVEDMEM_OF_TABLES()
178#endif
179
180#ifdef CONFIG_SMP
181#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \
182 VMLINUX_SYMBOL(__cpu_method_of_table) = .; \
183 *(__cpu_method_of_table) \
184 *(__cpu_method_of_table_end)
185#else
186#define CPU_METHOD_OF_TABLES()
187#endif
188 158
189#define KERNEL_DTB() \ 159#define KERNEL_DTB() \
190 STRUCT_ALIGN(); \ 160 STRUCT_ALIGN(); \