summaryrefslogtreecommitdiff
path: root/arch/csky/kernel/entry.S
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-04-02 14:39:42 +0300
committerGuo Ren <guoren@linux.alibaba.com>2020-04-02 14:39:42 +0300
commit000591f1ca3312d9a29e15a9e3fe5c4171f75586 (patch)
tree0090674bc8d4d35e1fa83f4735a7327d6a51150a /arch/csky/kernel/entry.S
parentde8636787119193ea1a4b7c1a13be0de5b64210f (diff)
downloadlinux-000591f1ca3312d9a29e15a9e3fe5c4171f75586.tar.xz
csky: Enable LOCKDEP_SUPPORT
Lockdep is needed by proving the spinlocks and rwlocks. Currently, we only put trace_hardirqs_on/off with csky_irq and ret_from_exception. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Diffstat (limited to 'arch/csky/kernel/entry.S')
-rw-r--r--arch/csky/kernel/entry.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S
index 0bde1d9fd277..8b040a1b11d0 100644
--- a/arch/csky/kernel/entry.S
+++ b/arch/csky/kernel/entry.S
@@ -225,6 +225,13 @@ ret_from_exception:
cmpnei r12, 0
bt exit_work
1:
+#ifdef CONFIG_TRACE_IRQFLAGS
+ ld r10, (sp, LSAVE_PSR)
+ btsti r10, 6
+ bf 2f
+ jbsr trace_hardirqs_on
+2:
+#endif
RESTORE_ALL
exit_work:
@@ -280,6 +287,10 @@ ENTRY(csky_irq)
zero_fp
psrset ee
+#ifdef CONFIG_TRACE_IRQFLAGS
+ jbsr trace_hardirqs_off
+#endif
+
#ifdef CONFIG_PREEMPTION
mov r9, sp /* Get current stack pointer */
bmaski r10, THREAD_SHIFT