diff options
author | Rabin Vincent <rabin@rab.in> | 2015-02-19 15:36:55 -0500 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2015-09-04 18:56:49 -0400 |
commit | 444e0c2881bcc70db6833d9c653c6ced36813d3b (patch) | |
tree | 49a9229250dd0772fabe063b691d80273b882ad2 /arch/cris | |
parent | 20ae24739968ae7f94d0e73215d444042f91df78 (diff) |
CRISv32: add support for irqflags tracing
Add support irqflags tracing, which is required for things like lockdep
and ftrace.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/Kconfig | 4 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/entry.S | 11 | ||||
-rw-r--r-- | arch/cris/kernel/irq.c | 6 |
3 files changed, 20 insertions, 1 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index b202b8277a26..e7ba2d4bdd4f 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -36,6 +36,10 @@ config FORCE_MAX_ZONEORDER | |||
36 | int | 36 | int |
37 | default 6 | 37 | default 6 |
38 | 38 | ||
39 | config TRACE_IRQFLAGS_SUPPORT | ||
40 | depends on ETRAX_ARCH_V32 | ||
41 | def_bool y | ||
42 | |||
39 | config CRIS | 43 | config CRIS |
40 | bool | 44 | bool |
41 | default y | 45 | default y |
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 1c5595a6ceb5..b17a20999f87 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
@@ -240,6 +240,17 @@ ret_from_sys_call: | |||
240 | 240 | ||
241 | .type _Rexit,@function | 241 | .type _Rexit,@function |
242 | _Rexit: | 242 | _Rexit: |
243 | #if defined(CONFIG_TRACE_IRQFLAGS) | ||
244 | addoq +PT_ccs, $sp, $acr | ||
245 | move.d [$acr], $r0 | ||
246 | btstq 15, $r0 ; I1 | ||
247 | bpl 1f | ||
248 | nop | ||
249 | jsr trace_hardirqs_on | ||
250 | nop | ||
251 | 1: | ||
252 | #endif | ||
253 | |||
243 | ;; This epilogue MUST match the prologues in multiple_interrupt, irq.h | 254 | ;; This epilogue MUST match the prologues in multiple_interrupt, irq.h |
244 | ;; and ptregs.h. | 255 | ;; and ptregs.h. |
245 | addq 4, $sp ; Skip orig_r10. | 256 | addq 4, $sp ; Skip orig_r10. |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index dd0be5de55d5..694850e8f077 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -45,7 +45,11 @@ | |||
45 | asmlinkage void do_IRQ(int irq, struct pt_regs * regs) | 45 | asmlinkage void do_IRQ(int irq, struct pt_regs * regs) |
46 | { | 46 | { |
47 | unsigned long sp; | 47 | unsigned long sp; |
48 | struct pt_regs *old_regs = set_irq_regs(regs); | 48 | struct pt_regs *old_regs; |
49 | |||
50 | trace_hardirqs_off(); | ||
51 | |||
52 | old_regs = set_irq_regs(regs); | ||
49 | irq_enter(); | 53 | irq_enter(); |
50 | sp = rdsp(); | 54 | sp = rdsp(); |
51 | if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) { | 55 | if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) { |