Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347250
b: refs/heads/master
c: 28570e8
h: refs/heads/master
v: v3
  • Loading branch information
Max Filippov authored and Chris Zankel committed Dec 19, 2012
1 parent 752779e commit 3b2a689
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c622b29d1f38021411965b7e0170ab055551b257
refs/heads/master: 28570e8dac5c86ab10ce2a7e9c02d3aaece63760
23 changes: 23 additions & 0 deletions trunk/arch/xtensa/include/asm/traps.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* arch/xtensa/include/asm/traps.h
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2012 Tensilica Inc.
*/
#ifndef _XTENSA_TRAPS_H
#define _XTENSA_TRAPS_H

#include <asm/ptrace.h>

/*
* handler must be either of the following:
* void (*)(struct pt_regs *regs);
* void (*)(struct pt_regs *regs, unsigned long exccause);
*/
extern void * __init trap_set_handler(int cause, void *handler);
extern void do_unhandled(struct pt_regs *regs, unsigned long exccause);

#endif /* _XTENSA_TRAPS_H */
11 changes: 11 additions & 0 deletions trunk/arch/xtensa/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,17 @@ do_debug(struct pt_regs *regs)
}


/* Set exception C handler - for temporary use when probing exceptions */

void * __init trap_set_handler(int cause, void *handler)
{
unsigned long *entry = &exc_table[EXC_TABLE_DEFAULT / 4 + cause];
void *previous = (void *)*entry;
*entry = (unsigned long)handler;
return previous;
}


/*
* Initialize dispatch tables.
*
Expand Down

0 comments on commit 3b2a689

Please sign in to comment.