Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374983
b: refs/heads/master
c: c92931b
h: refs/heads/master
i:
  374981: affed09
  374979: 844e689
  374975: e2cd586
v: v3
  • Loading branch information
Max Filippov authored and Chris Zankel committed May 9, 2013
1 parent b0598c1 commit d6705bd
Show file tree
Hide file tree
Showing 3 changed files with 36 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: 3ae908c99e944a7a5c4f4b2d8c603a6bc57b728b
refs/heads/master: c92931b200156e304350e3e9f138e6abfb1f2913
3 changes: 3 additions & 0 deletions trunk/arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ source "kernel/Kconfig.freezer"
config STACKTRACE_SUPPORT
def_bool y

config TRACE_IRQFLAGS_SUPPORT
def_bool y

config MMU
def_bool n

Expand Down
32 changes: 32 additions & 0 deletions trunk/arch/xtensa/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,22 @@ common_exception:

save_xtregs_opt a1 a2 a4 a5 a6 a7 PT_XTREGS_OPT
#ifdef CONFIG_TRACE_IRQFLAGS
l32i a4, a1, PT_DEPC
/* Double exception means we came here with an exception
* while PS.EXCM was set, i.e. interrupts disabled.
*/
bgeui a4, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
l32i a4, a1, PT_EXCCAUSE
bnei a4, EXCCAUSE_LEVEL1_INTERRUPT, 1f
/* We came here with an interrupt means interrupts were enabled
* and we've just disabled them.
*/
movi a4, trace_hardirqs_off
callx4 a4
1:
#endif

/* Go to second-level dispatcher. Set up parameters to pass to the
* exception handler and call the exception handler.
*/
Expand All @@ -407,6 +423,22 @@ common_exception:
.global common_exception_return
common_exception_return:

#ifdef CONFIG_TRACE_IRQFLAGS
l32i a4, a1, PT_DEPC
/* Double exception means we came here with an exception
* while PS.EXCM was set, i.e. interrupts disabled.
*/
bgeui a4, VALID_DOUBLE_EXCEPTION_ADDRESS, 1f
l32i a4, a1, PT_EXCCAUSE
bnei a4, EXCCAUSE_LEVEL1_INTERRUPT, 1f
/* We came here with an interrupt means interrupts were enabled
* and we'll reenable them on return.
*/
movi a4, trace_hardirqs_on
callx4 a4
1:
#endif

/* Jump if we are returning from kernel exceptions. */

1: l32i a3, a1, PT_PS
Expand Down

0 comments on commit d6705bd

Please sign in to comment.