aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/traps.c')
-rw-r--r--arch/arm/kernel/traps.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index cd77743472a2..778454750a6c 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -227,6 +227,11 @@ void show_stack(struct task_struct *tsk, unsigned long *sp)
227#else 227#else
228#define S_SMP "" 228#define S_SMP ""
229#endif 229#endif
230#ifdef CONFIG_THUMB2_KERNEL
231#define S_ISA " THUMB2"
232#else
233#define S_ISA " ARM"
234#endif
230 235
231static int __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) 236static int __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs)
232{ 237{
@@ -234,8 +239,8 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt
234 static int die_counter; 239 static int die_counter;
235 int ret; 240 int ret;
236 241
237 printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", 242 printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP
238 str, err, ++die_counter); 243 S_ISA "\n", str, err, ++die_counter);
239 244
240 /* trap and error numbers are mostly meaningless on ARM */ 245 /* trap and error numbers are mostly meaningless on ARM */
241 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); 246 ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV);
@@ -784,18 +789,16 @@ static void __init kuser_get_tls_init(unsigned long vectors)
784 memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); 789 memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4);
785} 790}
786 791
787void __init early_trap_init(void) 792void __init early_trap_init(void *vectors_base)
788{ 793{
789#if defined(CONFIG_CPU_USE_DOMAINS) 794 unsigned long vectors = (unsigned long)vectors_base;
790 unsigned long vectors = CONFIG_VECTORS_BASE;
791#else
792 unsigned long vectors = (unsigned long)vectors_page;
793#endif
794 extern char __stubs_start[], __stubs_end[]; 795 extern char __stubs_start[], __stubs_end[];
795 extern char __vectors_start[], __vectors_end[]; 796 extern char __vectors_start[], __vectors_end[];
796 extern char __kuser_helper_start[], __kuser_helper_end[]; 797 extern char __kuser_helper_start[], __kuser_helper_end[];
797 int kuser_sz = __kuser_helper_end - __kuser_helper_start; 798 int kuser_sz = __kuser_helper_end - __kuser_helper_start;
798 799
800 vectors_page = vectors_base;
801
799 /* 802 /*
800 * Copy the vectors, stubs and kuser helpers (in entry-armv.S) 803 * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
801 * into the vector page, mapped at 0xffff0000, and ensure these 804 * into the vector page, mapped at 0xffff0000, and ensure these