Skip to contentSkip to conversation

m68k: apollo: Fix interrupt setup

PATCH In review Daniel Palmer 2 participants 2 messages Aug 28 – Sep 27 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: apollo: Fix interrupt setup

The user interrupt vector needs to be installed before the interrupts are unmasked otherwise the timer tick isn't handled and boot up gets stuck in calibrate_delay().

Assisted-by Claude:claude-fable-5 # Wrote Apollo DN3000 emulator using QEMU

---

Backstory: I have Claude creating a version of QEMU that can emulate every supported m68k machine. Its still working on getting Domain/OS booting but it found that Linux locked up on boot and I used gdb to find the cause.

 arch/m68k/apollo/dn_ints.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/m68k/apollo/dn_ints.c +6 -0
index ba96a92f8f18..89bfb5aaad9d 100644
@@ -2,6 +2,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 
+#include <asm/irq.h>
 #include <asm/traps.h>
 #include <asm/apollohw.h>
 
@@ -11,10 +12,13 @@ static unsigned int apollo_irq_startup(struct irq_data *data)
 {
 	unsigned int irq = data->irq;
 
+	m68k_irq_startup(data);
+
 	if (irq < 8)
 		*(volatile unsigned char *)(pica+1) &= ~(1 << irq);
 	else
 		*(volatile unsigned char *)(picb+1) &= ~(1 << (irq - 8));
+
 	return 0;
 }
 
@@ -26,6 +30,8 @@ static void apollo_irq_shutdown(struct irq_data *data)
 		*(volatile unsigned char *)(pica+1) |= (1 << irq);
 	else
 		*(volatile unsigned char *)(picb+1) |= (1 << (irq - 8));
+
+	m68k_irq_shutdown(data);
 }
 
 static void apollo_irq_eoi(struct irq_data *data)
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi Daniel,

Quoted 6 lines · Daniel Palmer

The user interrupt vector needs to be installed before the interrupts are unmasked otherwise the timer tick isn't handled and boot up gets stuck in calibrate_delay().

Assisted-by Claude:claude-fable-5 # Wrote Apollo DN3000 emulator using QEMU

Thanks for your patch!

Fixes 0aa78106c661cf6c ("[PATCH] m68k: convert apollo irq code")

LGTM, so

i.e. will queue in the m68k tree for v7.4.

Quoted 4 lines

Backstory: I have Claude creating a version of QEMU that can emulate every supported m68k machine. Its still working on getting Domain/OS booting but it found that Linux locked up on boot and I used gdb to find the cause.

IIRC, you need several of them. A single DN machine feels lonely, and requires caretaking by the domain controller ;-)

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds