Skip to content

Commit 444e0c2

Browse files
vitkyrkaJesper Nilsson
authored andcommitted
CRISv32: add support for irqflags tracing
Add support irqflags tracing, which is required for things like lockdep and ftrace. Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Jesper Nilsson <[email protected]>
1 parent 20ae247 commit 444e0c2

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

arch/cris/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ config FORCE_MAX_ZONEORDER
3636
int
3737
default 6
3838

39+
config TRACE_IRQFLAGS_SUPPORT
40+
depends on ETRAX_ARCH_V32
41+
def_bool y
42+
3943
config CRIS
4044
bool
4145
default y

arch/cris/arch-v32/kernel/entry.S

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,17 @@ ret_from_sys_call:
240240

241241
.type _Rexit,@function
242242
_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+
243254
;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
244255
;; and ptregs.h.
245256
addq 4, $sp ; Skip orig_r10.

arch/cris/kernel/irq.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
4646
{
4747
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);
4953
irq_enter();
5054
sp = rdsp();
5155
if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) {

0 commit comments

Comments
 (0)