Skip to content

Commit

Permalink
csky: Enable LOCKDEP_SUPPORT
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
guoren83 committed Apr 2, 2020
1 parent de86367 commit 000591f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/csky/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 11 additions & 0 deletions arch/csky/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 000591f

Please sign in to comment.