-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 77751 b: refs/heads/master c: 5a4f7c6 h: refs/heads/master i: 77749: fbc4501 77747: 7a61ae9 77743: 78e1772 v: v3
- Loading branch information
Paul Mundt
committed
Jan 28, 2008
1 parent
e3c4ebc
commit 3cd38b9
Showing
11 changed files
with
103 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 811d50cb43eb730cc325df0c6913556e25739797 | ||
refs/heads/master: 5a4f7c66be981c6b5f44a4d66a14ea6ac9b7b6b0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include <linux/bug.h> | ||
#include <linux/io.h> | ||
#include <linux/types.h> | ||
#include <linux/kdebug.h> | ||
#include <asm/system.h> | ||
|
||
#ifdef CONFIG_BUG | ||
static void handle_BUG(struct pt_regs *regs) | ||
{ | ||
enum bug_trap_type tt; | ||
tt = report_bug(regs->pc, regs); | ||
if (tt == BUG_TRAP_TYPE_WARN) { | ||
regs->pc += instruction_size(regs->pc); | ||
return; | ||
} | ||
|
||
die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); | ||
} | ||
|
||
int is_valid_bugaddr(unsigned long addr) | ||
{ | ||
return addr >= PAGE_OFFSET; | ||
} | ||
#endif | ||
|
||
/* | ||
* Generic trap handler. | ||
*/ | ||
BUILD_TRAP_HANDLER(debug) | ||
{ | ||
TRAP_HANDLER_DECL; | ||
|
||
/* Rewind */ | ||
regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); | ||
|
||
if (notify_die(DIE_TRAP, "debug trap", regs, 0, vec & 0xff, | ||
SIGTRAP) == NOTIFY_STOP) | ||
return; | ||
|
||
force_sig(SIGTRAP, current); | ||
} | ||
|
||
/* | ||
* Special handler for BUG() traps. | ||
*/ | ||
BUILD_TRAP_HANDLER(bug) | ||
{ | ||
TRAP_HANDLER_DECL; | ||
|
||
/* Rewind */ | ||
regs->pc -= instruction_size(ctrl_inw(regs->pc - 4)); | ||
|
||
if (notify_die(DIE_TRAP, "bug trap", regs, 0, TRAPA_BUG_OPCODE & 0xff, | ||
SIGTRAP) == NOTIFY_STOP) | ||
return; | ||
|
||
#ifdef CONFIG_BUG | ||
if (__kernel_text_address(instruction_pointer(regs))) { | ||
opcode_t insn = *(opcode_t *)instruction_pointer(regs); | ||
if (insn == TRAPA_BUG_OPCODE) | ||
handle_BUG(regs); | ||
} | ||
#endif | ||
|
||
force_sig(SIGTRAP, current); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters