aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/traps.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
committerJiri Kosina <jkosina@suse.cz>2013-01-29 04:48:30 -0500
commit617677295b53a40d0e54aac4cbbc216ffbc755dd (patch)
tree51b9e87213243ed5efff252c8e8d8fec4eebc588 /arch/xtensa/kernel/traps.c
parent5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff)
parent6abb7c25775b7fb2225ad0508236d63ca710e65f (diff)
Merge branch 'master' into for-next
Conflicts: drivers/devfreq/exynos4_bus.c Sync with Linus' tree to be able to apply patches that are against newer code (mvneta).
Diffstat (limited to 'arch/xtensa/kernel/traps.c')
-rw-r--r--arch/xtensa/kernel/traps.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 5caf2b64d43a..01e0111bf787 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -293,6 +293,17 @@ do_debug(struct pt_regs *regs)
293} 293}
294 294
295 295
296/* Set exception C handler - for temporary use when probing exceptions */
297
298void * __init trap_set_handler(int cause, void *handler)
299{
300 unsigned long *entry = &exc_table[EXC_TABLE_DEFAULT / 4 + cause];
301 void *previous = (void *)*entry;
302 *entry = (unsigned long)handler;
303 return previous;
304}
305
306
296/* 307/*
297 * Initialize dispatch tables. 308 * Initialize dispatch tables.
298 * 309 *
@@ -397,7 +408,8 @@ static inline void spill_registers(void)
397 "wsr a13, sar\n\t" 408 "wsr a13, sar\n\t"
398 "wsr a14, ps\n\t" 409 "wsr a14, ps\n\t"
399 :: "a" (&a0), "a" (&ps) 410 :: "a" (&a0), "a" (&ps)
400 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); 411 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15",
412 "memory");
401} 413}
402 414
403void show_trace(struct task_struct *task, unsigned long *sp) 415void show_trace(struct task_struct *task, unsigned long *sp)
@@ -452,7 +464,7 @@ void show_stack(struct task_struct *task, unsigned long *sp)
452 464
453 if (!sp) 465 if (!sp)
454 sp = stack_pointer(task); 466 sp = stack_pointer(task);
455 stack = sp; 467 stack = sp;
456 468
457 printk("\nStack: "); 469 printk("\nStack: ");
458 470
@@ -523,5 +535,3 @@ void die(const char * str, struct pt_regs * regs, long err)
523 535
524 do_exit(err); 536 do_exit(err);
525} 537}
526
527