diff options
Diffstat (limited to 'arch/xtensa/kernel/traps.c')
-rw-r--r-- | arch/xtensa/kernel/traps.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c index c44f830b6c7a..9f0b71189e94 100644 --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c | |||
@@ -104,6 +104,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = { | |||
104 | #endif | 104 | #endif |
105 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, | 105 | { EXCCAUSE_UNALIGNED, KRNL, fast_unaligned }, |
106 | #endif | 106 | #endif |
107 | #ifdef CONFIG_MMU | ||
107 | { EXCCAUSE_ITLB_MISS, 0, do_page_fault }, | 108 | { EXCCAUSE_ITLB_MISS, 0, do_page_fault }, |
108 | { EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, | 109 | { EXCCAUSE_ITLB_MISS, USER|KRNL, fast_second_level_miss}, |
109 | { EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, | 110 | { EXCCAUSE_ITLB_MULTIHIT, 0, do_multihit }, |
@@ -118,6 +119,7 @@ static dispatch_init_table_t __initdata dispatch_init_table[] = { | |||
118 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, | 119 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, USER|KRNL, fast_store_prohibited }, |
119 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, | 120 | { EXCCAUSE_STORE_CACHE_ATTRIBUTE, 0, do_page_fault }, |
120 | { EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, | 121 | { EXCCAUSE_LOAD_CACHE_ATTRIBUTE, 0, do_page_fault }, |
122 | #endif /* CONFIG_MMU */ | ||
121 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ | 123 | /* XCCHAL_EXCCAUSE_FLOATING_POINT unhandled */ |
122 | #if XTENSA_HAVE_COPROCESSOR(0) | 124 | #if XTENSA_HAVE_COPROCESSOR(0) |
123 | COPROCESSOR(0), | 125 | COPROCESSOR(0), |
@@ -372,11 +374,10 @@ void show_trace(struct task_struct *task, unsigned long *sp) | |||
372 | unsigned long a0, a1, pc; | 374 | unsigned long a0, a1, pc; |
373 | unsigned long sp_start, sp_end; | 375 | unsigned long sp_start, sp_end; |
374 | 376 | ||
375 | a1 = (unsigned long)sp; | 377 | if (sp) |
376 | 378 | a1 = (unsigned long)sp; | |
377 | if (a1 == 0) | 379 | else |
378 | __asm__ __volatile__ ("mov %0, a1\n" : "=a"(a1)); | 380 | a1 = task->thread.sp; |
379 | |||
380 | 381 | ||
381 | sp_start = a1 & ~(THREAD_SIZE-1); | 382 | sp_start = a1 & ~(THREAD_SIZE-1); |
382 | sp_end = sp_start + THREAD_SIZE; | 383 | sp_end = sp_start + THREAD_SIZE; |
@@ -418,9 +419,8 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
418 | int i = 0; | 419 | int i = 0; |
419 | unsigned long *stack; | 420 | unsigned long *stack; |
420 | 421 | ||
421 | if (sp == 0) | 422 | if (!sp) |
422 | __asm__ __volatile__ ("mov %0, a1\n" : "=a"(sp)); | 423 | sp = (unsigned long *)task->thread.sp; |
423 | |||
424 | stack = sp; | 424 | stack = sp; |
425 | 425 | ||
426 | printk("\nStack: "); | 426 | printk("\nStack: "); |