Skip to content

Commit 000591f

Browse files
committed
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 <[email protected]>
1 parent de86367 commit 000591f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

arch/csky/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ config CSKY
6969
select PCI_SYSCALL if PCI
7070
select PCI_MSI if PCI
7171

72+
config LOCKDEP_SUPPORT
73+
def_bool y
74+
7275
config CPU_HAS_CACHEV2
7376
bool
7477

arch/csky/kernel/entry.S

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ ret_from_exception:
225225
cmpnei r12, 0
226226
bt exit_work
227227
1:
228+
#ifdef CONFIG_TRACE_IRQFLAGS
229+
ld r10, (sp, LSAVE_PSR)
230+
btsti r10, 6
231+
bf 2f
232+
jbsr trace_hardirqs_on
233+
2:
234+
#endif
228235
RESTORE_ALL
229236

230237
exit_work:
@@ -280,6 +287,10 @@ ENTRY(csky_irq)
280287
zero_fp
281288
psrset ee
282289

290+
#ifdef CONFIG_TRACE_IRQFLAGS
291+
jbsr trace_hardirqs_off
292+
#endif
293+
283294
#ifdef CONFIG_PREEMPTION
284295
mov r9, sp /* Get current stack pointer */
285296
bmaski r10, THREAD_SHIFT

0 commit comments

Comments
 (0)