Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afbfb52e authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: stacktrace/lockdep/irqflags tracing support.



Wire up all of the essentials for lockdep..

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent c03c6961
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -51,6 +51,14 @@ config GENERIC_TIME
config ARCH_MAY_HAVE_PC_FDC
	bool

config STACKTRACE_SUPPORT
	bool
	default y

config LOCKDEP_SUPPORT
	bool
	default y

source "init/Kconfig"

menu "System type"
+4 −0
Original line number Diff line number Diff line
menu "Kernel hacking"

config TRACE_IRQFLAGS_SUPPORT
	bool
	default y

source "lib/Kconfig.debug"

config SH_STANDARD_BIOS
+1 −0
Original line number Diff line number Diff line
@@ -21,3 +21,4 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o
obj-$(CONFIG_APM)		+= apm.o
obj-$(CONFIG_PM)		+= pm.o
obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
+16 −0
Original line number Diff line number Diff line
@@ -184,6 +184,11 @@ trap_entry:
	add	r15,r8
	mov.l	r9,@r8
	mov	r9,r8
#ifdef CONFIG_TRACE_IRQFLAGS
	mov.l	5f, r9
	jsr	@r9
	 nop
#endif
	sti
	bra	system_call
	 nop
@@ -193,6 +198,9 @@ trap_entry:
2:	.long	break_point_trap_software
3:	.long	NR_syscalls
4:	.long	sys_call_table
#ifdef CONFIG_TRACE_IRQFLAGS
5:	.long	trace_hardirqs_on
#endif

#if defined(CONFIG_SH_STANDARD_BIOS)
	/* Unwind the stack and jmp to the debug entry */
@@ -255,6 +263,11 @@ ENTRY(address_error_handler)

restore_all:
	cli
#ifdef CONFIG_TRACE_IRQFLAGS
	mov.l	3f, r0
	jsr	@r0
	 nop
#endif
	mov	r15,r0
	mov.l	$cpu_mode,r2
	mov	#OFF_SR,r3
@@ -307,6 +320,9 @@ $current_thread_info:
	.long	__current_thread_info
$cpu_mode:	
	.long	__cpu_mode
#ifdef CONFIG_TRACE_IRQFLAGS
3:	.long	trace_hardirqs_off
#endif
		
! common exception handler
#include "../../entry-common.S"
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ call_dpf:
	mov.l	1f, r0
 	mov.l	@r0, r6		! address
	mov.l	3f, r0
	sti

	jmp	@r0
 	 mov	r15, r4		! regs

Loading