Skip to contentSkip to conversation

m68k: amiga: turn off all incoming interrupts from the Warp1260 during boot

PATCH In review Paolo Pisati 2 participants 2 messages Jun 1, 2024 – Jun 4, 2024 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 m68k: amiga: turn off all incoming interrupts from the Warp1260 during boot

On an Amiga 1200 equipped with a Warp1260 accelerator, an interrupt storm coming from the accelerator board causes the machine to crash in local_irq_enable() or auto_irq_enable(). Disabling interrupts for the Warp1260 in amiga_parse_bootinfo() fixes the problem.

---
Changes since v3:
-simplify commit body and subject

Changes since v2:
-moved changelog history below tags

Changes since v1:
-addressed all comments from Geert and Michael

---
 arch/m68k/amiga/config.c       | 9 +++++++++
 include/uapi/linux/zorro_ids.h | 3 +++
 2 files changed, 12 insertions(+)
arch/m68k/amiga/config.c +9 -0
index 3137b45750df..fa74452600c1 100644
@@ -180,6 +180,15 @@ int __init amiga_parse_bootinfo(const struct bi_record *record)
 			dev->slotsize = be16_to_cpu(cd->cd_SlotSize);
 			dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr);
 			dev->boardsize = be32_to_cpu(cd->cd_BoardSize);
+
+			/* CS-LAB Warp 1260 workaround */
+			if (be16_to_cpu(dev->rom.er_Manufacturer) == ZORRO_MANUF(ZORRO_PROD_CSLAB_WARP_1260) &&
+			    dev->rom.er_Product == ZORRO_PROD(ZORRO_PROD_CSLAB_WARP_1260)) {
+
+				/* turn off all interrupts */
+				pr_info("Warp 1260 card detected: applying interrupt storm workaround");
+				*(uint32_t *)(dev->boardaddr + 0x1000) = 0x0FFF;
+			}
 		} else
 			pr_warn("amiga_parse_bootinfo: too many AutoConfig devices\n");
 #endif /* CONFIG_ZORRO */
include/uapi/linux/zorro_ids.h +3 -0
index 6e574d7b7d79..393f2ee9c042 100644
@@ -449,6 +449,9 @@
 #define  ZORRO_PROD_VMC_ISDN_BLASTER_Z2				ZORRO_ID(VMC, 0x01, 0)
 #define  ZORRO_PROD_VMC_HYPERCOM_4				ZORRO_ID(VMC, 0x02, 0)
 
+#define ZORRO_MANUF_CSLAB					0x1400
+#define  ZORRO_PROD_CSLAB_WARP_1260				ZORRO_ID(CSLAB, 0x65, 0)
+
 #define ZORRO_MANUF_INFORMATION					0x157C
 #define  ZORRO_PROD_INFORMATION_ISDN_ENGINE_I			ZORRO_ID(INFORMATION, 0x64, 0)
 
Signature · 1 line
2.34.1
maintainer Reviewed-by on v4 1/1
#1 lore raw

Hi Paolo,

Quoted 11 lines · Paolo Pisati

On an Amiga 1200 equipped with a Warp1260 accelerator, an interrupt storm coming from the accelerator board causes the machine to crash in local_irq_enable() or auto_irq_enable(). Disabling interrupts for the Warp1260 in amiga_parse_bootinfo() fixes the problem.

---
Changes since v3:
-simplify commit body and subject

Thanks for the update!

arch/m68k/amiga/config.c int __init amiga_parse_bootinfo(const struct bi_record *record) · line 189

Quoted 13 lines
arch/m68k/amiga/config.c +7 -0
@@ -180,6 +180,15 @@ int __init amiga_parse_bootinfo(const struct bi_record *record)
                        dev->slotsize = be16_to_cpu(cd->cd_SlotSize);
                        dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr);
                        dev->boardsize = be32_to_cpu(cd->cd_BoardSize);
+
+                       /* CS-LAB Warp 1260 workaround */
+                       if (be16_to_cpu(dev->rom.er_Manufacturer) == ZORRO_MANUF(ZORRO_PROD_CSLAB_WARP_1260) &&
+                           dev->rom.er_Product == ZORRO_PROD(ZORRO_PROD_CSLAB_WARP_1260)) {
+
+                               /* turn off all interrupts */
+                               pr_info("Warp 1260 card detected: applying interrupt storm workaround");

Missing "\n".

arch/m68k/amiga/config.c int __init amiga_parse_bootinfo(const struct bi_record *record) · line 194

Quoted 5 lines
arch/m68k/amiga/config.c +2 -0
+                               *(uint32_t *)(dev->boardaddr + 0x1000) = 0x0FFF;
+                       }
                } else
                        pr_warn("amiga_parse_bootinfo: too many AutoConfig devices\n");
 #endif /* CONFIG_ZORRO */

i.e. will queue in the m68k tree for v6.11, with the above fixed. No need to resend.

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