aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2012-10-29 14:19:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-11-04 05:31:16 -0500
commitee951c630c5ce5108f8014ce1c9d738b5bbfea60 (patch)
treea0f7428f58d1ff028c4a88c94fdb1aa61bbcbbd6
parenta68becd1dcda55b467dcabaff136cadc10abb761 (diff)
ARM: 7568/1: Sort exception table at compile time
Add the ARM machine identifier to sortextable and select the config option so that we can sort the exception table at compile time. sortextable relies on a section named __ex_table existing in the vmlinux, but ARM's linker script places the exception table in the data section. Give the exception table its own section so that sortextable can find it. This allows us to skip the sorting step during boot. Cc: David Daney <david.daney@cavium.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Tested-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm/kernel/vmlinux.lds.S19
-rw-r--r--scripts/sortextable.c1
3 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 73067efd4845..208414c0506a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -5,6 +5,7 @@ config ARM
5 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 5 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
6 select ARCH_HAVE_CUSTOM_GPIO_H 6 select ARCH_HAVE_CUSTOM_GPIO_H
7 select ARCH_WANT_IPC_PARSE_VERSION 7 select ARCH_WANT_IPC_PARSE_VERSION
8 select BUILDTIME_EXTABLE_SORT if MMU
8 select CPU_PM if (SUSPEND || CPU_IDLE) 9 select CPU_PM if (SUSPEND || CPU_IDLE)
9 select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN 10 select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN
10 select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) 11 select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 36ff15bbfdd4..b9f38e388b43 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -114,6 +114,15 @@ SECTIONS
114 114
115 RO_DATA(PAGE_SIZE) 115 RO_DATA(PAGE_SIZE)
116 116
117 . = ALIGN(4);
118 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
119 __start___ex_table = .;
120#ifdef CONFIG_MMU
121 *(__ex_table)
122#endif
123 __stop___ex_table = .;
124 }
125
117#ifdef CONFIG_ARM_UNWIND 126#ifdef CONFIG_ARM_UNWIND
118 /* 127 /*
119 * Stack unwinding tables 128 * Stack unwinding tables
@@ -220,16 +229,6 @@ SECTIONS
220 READ_MOSTLY_DATA(L1_CACHE_BYTES) 229 READ_MOSTLY_DATA(L1_CACHE_BYTES)
221 230
222 /* 231 /*
223 * The exception fixup table (might need resorting at runtime)
224 */
225 . = ALIGN(4);
226 __start___ex_table = .;
227#ifdef CONFIG_MMU
228 *(__ex_table)
229#endif
230 __stop___ex_table = .;
231
232 /*
233 * and the usual data section 232 * and the usual data section
234 */ 233 */
235 DATA_DATA 234 DATA_DATA
diff --git a/scripts/sortextable.c b/scripts/sortextable.c
index f19ddc47304c..1f10e89d15b4 100644
--- a/scripts/sortextable.c
+++ b/scripts/sortextable.c
@@ -248,6 +248,7 @@ do_file(char const *const fname)
248 case EM_S390: 248 case EM_S390:
249 custom_sort = sort_relative_table; 249 custom_sort = sort_relative_table;
250 break; 250 break;
251 case EM_ARM:
251 case EM_MIPS: 252 case EM_MIPS:
252 break; 253 break;
253 } /* end switch */ 254 } /* end switch */