m68k: apollo: Fix interrupt setup
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().
---
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
@@ -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
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 QEMUSigned-off-by Daniel Palmer <[email protected]>
Thanks for your patch!
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