aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/kernel/traps.c')
-rw-r--r--arch/xtensa/kernel/traps.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 5caf2b64d43a..691a792b01d3 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 *