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

Commit 192ef366 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[MIPS] TRACE_IRQFLAGS_SUPPORT support.

parent 8d197f3d
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
menu "Kernel hacking"
menu "Kernel hacking"


config TRACE_IRQFLAGS_SUPPORT
	bool
	default y

source "lib/Kconfig.debug"
source "lib/Kconfig.debug"


config CROSSCOMPILE
config CROSSCOMPILE
+15 −0
Original line number Original line Diff line number Diff line
@@ -113,6 +113,21 @@ FEXPORT(restore_all) # restore full frame
	RESTORE_AT
	RESTORE_AT
	RESTORE_STATIC
	RESTORE_STATIC
FEXPORT(restore_partial)		# restore partial frame
FEXPORT(restore_partial)		# restore partial frame
#ifdef CONFIG_TRACE_IRQFLAGS
	SAVE_STATIC
	SAVE_AT
	SAVE_TEMP
	LONG_L	v0, PT_STATUS(sp)
	and	v0, 1
	beqz	v0, 1f
	jal	trace_hardirqs_on
	b	2f
1:	jal	trace_hardirqs_off
2:
	RESTORE_TEMP
	RESTORE_AT
	RESTORE_STATIC
#endif
	RESTORE_SOME
	RESTORE_SOME
	RESTORE_SP_AND_RET
	RESTORE_SP_AND_RET
	.set	at
	.set	at
+2 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,7 @@


#include <asm/asm.h>
#include <asm/asm.h>
#include <asm/errno.h>
#include <asm/errno.h>
#include <asm/irqflags.h>
#include <asm/mipsregs.h>
#include <asm/mipsregs.h>
#include <asm/regdef.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
#include <asm/stackframe.h>
@@ -120,6 +121,7 @@
		LONG_S	$31, GDB_FR_REG31(sp)
		LONG_S	$31, GDB_FR_REG31(sp)


		CLI				/* disable interrupts */
		CLI				/* disable interrupts */
		TRACE_IRQS_OFF


/*
/*
 * Followed by the floating point registers
 * Followed by the floating point registers
+6 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@
#include <asm/asm.h>
#include <asm/asm.h>
#include <asm/asmmacro.h>
#include <asm/asmmacro.h>
#include <asm/cacheops.h>
#include <asm/cacheops.h>
#include <asm/irqflags.h>
#include <asm/regdef.h>
#include <asm/regdef.h>
#include <asm/fpregdef.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
#include <asm/mipsregs.h>
@@ -128,6 +129,7 @@ handle_vcei:
NESTED(handle_int, PT_SIZE, sp)
NESTED(handle_int, PT_SIZE, sp)
	SAVE_ALL
	SAVE_ALL
	CLI
	CLI
	TRACE_IRQS_OFF


	PTR_LA	ra, ret_from_irq
	PTR_LA	ra, ret_from_irq
	move	a0, sp
	move	a0, sp
@@ -216,6 +218,7 @@ NESTED(except_vec_vi_handler, 0, sp)
	_ehb
	_ehb
#endif /* CONFIG_MIPS_MT_SMTC */
#endif /* CONFIG_MIPS_MT_SMTC */
	CLI
	CLI
	TRACE_IRQS_OFF
	move	a0, sp
	move	a0, sp
	jalr	v0
	jalr	v0
	j	ret_from_irq
	j	ret_from_irq
@@ -288,11 +291,13 @@ NESTED(nmi_handler, PT_SIZE, sp)
	.endm
	.endm


	.macro	__build_clear_sti
	.macro	__build_clear_sti
	TRACE_IRQS_ON
	STI
	STI
	.endm
	.endm


	.macro	__build_clear_cli
	.macro	__build_clear_cli
	CLI
	CLI
	TRACE_IRQS_OFF
	.endm
	.endm


	.macro	__build_clear_fpe
	.macro	__build_clear_fpe
@@ -300,6 +305,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
	li	a2, ~(0x3f << 12)
	li	a2, ~(0x3f << 12)
	and	a2, a1
	and	a2, a1
	ctc1	a2, fcr31
	ctc1	a2, fcr31
	TRACE_IRQS_ON
	STI
	STI
	.endm
	.endm


+2 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@
 *
 *
 * Copyright (C) 1994, 1995 Waldorf Electronics
 * Copyright (C) 1994, 1995 Waldorf Electronics
 * Written by Ralf Baechle and Andreas Busse
 * Written by Ralf Baechle and Andreas Busse
 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2003 Ralf Baechle
 * Copyright (C) 1994 - 99, 2003, 06 Ralf Baechle
 * Copyright (C) 1996 Paul M. Antoine
 * Copyright (C) 1996 Paul M. Antoine
 * Modified for DECStation and hence R3000 support by Paul M. Antoine
 * Modified for DECStation and hence R3000 support by Paul M. Antoine
 * Further modifications by David S. Miller and Harald Koerfgen
 * Further modifications by David S. Miller and Harald Koerfgen
@@ -18,6 +18,7 @@


#include <asm/asm.h>
#include <asm/asm.h>
#include <asm/asmmacro.h>
#include <asm/asmmacro.h>
#include <asm/irqflags.h>
#include <asm/regdef.h>
#include <asm/regdef.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/mipsregs.h>
#include <asm/mipsregs.h>
Loading