[PATCH v3 1/2] m68k: Add tracirqs

From: Jean-Michel Hautbois
Date: Tue Dec 03 2024 - 15:32:56 EST


The TRACE_IRQFLAGS_SUPPORT requires the architecture to call
trace_hardirqs_off() when interrupts are disabled and
trace_hardirqs_on() when they are enabled.
Add those calls to do_IRQ function.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@xxxxxxxxxx>
---
arch/m68k/Kconfig | 1 +
arch/m68k/kernel/irq.c | 2 ++
2 files changed, 3 insertions(+)

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 7c4f7bcc89d76326b9d7280a3bcba79412ead7d2..793ab1e2762609725bbf793f6dffecfa3ecfff0f 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -39,6 +39,7 @@ config M68K
select OLD_SIGSUSPEND3
select UACCESS_MEMCPY if !MMU
select ZONE_DMA
+ select TRACE_IRQFLAGS_SUPPORT

config CPU_BIG_ENDIAN
def_bool y
diff --git a/arch/m68k/kernel/irq.c b/arch/m68k/kernel/irq.c
index 9ab4f550342e5de11c528f55781432675ffd66bf..74cf60ebbc4bca51f3caa4046dbd2bdb02355711 100644
--- a/arch/m68k/kernel/irq.c
+++ b/arch/m68k/kernel/irq.c
@@ -21,9 +21,11 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
{
struct pt_regs *oldregs = set_irq_regs(regs);

+ trace_hardirqs_off();
irq_enter();
generic_handle_irq(irq);
irq_exit();
+ trace_hardirqs_on();

set_irq_regs(oldregs);
}

--
2.39.5