From: guoren@kernel.org
To: arnd@arndb.de
Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org,
Guo Ren <guoren@linux.alibaba.com>
Subject: [PATCH 08/11] csky: Enable LOCKDEP_SUPPORT
Date: Fri, 3 Apr 2020 12:41:47 +0800 [thread overview]
Message-ID: <20200403044150.20562-8-guoren@kernel.org> (raw)
In-Reply-To: <20200403044150.20562-1-guoren@kernel.org>
From: Guo Ren <guoren@linux.alibaba.com>
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>
---
arch/csky/Kconfig | 3 +++
arch/csky/kernel/entry.S | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index a75b8e1fef1d..998188f44fd7 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -69,6 +69,9 @@ config CSKY
select PCI_SYSCALL if PCI
select PCI_MSI if PCI
+config LOCKDEP_SUPPORT
+ def_bool y
+
config CPU_HAS_CACHEV2
bool
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
--
2.17.0
next prev parent reply other threads:[~2020-04-03 4:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 4:41 [PATCH 01/11] csky: Fixup init_fpu compile warning with __init guoren
2020-04-03 4:41 ` [PATCH 02/11] csky: Implement ptrace regs and stack API guoren
2020-04-03 4:41 ` [PATCH 03/11] csky: Add support for restartable sequence guoren
2020-04-03 4:41 ` [PATCH 04/11] csky: Implement ftrace with regs guoren
2020-04-03 4:41 ` [PATCH 05/11] csky/ftrace: Fixup ftrace_modify_code deadlock without CPU_HAS_ICACHE_INS guoren
2020-04-03 4:41 ` [PATCH 06/11] csky: Fixup get wrong psr value from phyical reg guoren
2020-04-03 4:41 ` [PATCH 07/11] csky: Enable the gcov function guoren
2020-04-03 4:41 ` guoren [this message]
2020-04-03 4:41 ` [PATCH 09/11] csky: Add kprobes supported guoren
2020-04-03 4:41 ` [PATCH 10/11] csky: Add uprobes support guoren
2020-04-03 4:41 ` [PATCH 11/11] csky: Fixup cpu speculative execution to IO area guoren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200403044150.20562-8-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=arnd@arndb.de \
--cc=guoren@linux.alibaba.com \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.