Looking at the code more I do think that doing something like my hack is probably the way to deal with this.
Maybe something like this:
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index 30a55207c000..2136e85dd5b0 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -317,6 +317,16 @@ static int probe_8259A(void)
if (new_val != probe_val) {
printk(KERN_INFO "Using NULL legacy PIC\n");
legacy_pic = &null_legacy_pic;
+#ifdef CONFIG_X86_IO_APIC
+ /*
+ * Some AMD Zen based devices have the PIC disabled by the BIOS
+ * but they still use legacy ISA IRQs attached through the IOAPIC.
+ */
+ if (boot_cpu_has(X86_FEATURE_ZEN)) {
+ printk(KERN_INFO "Using IOAPIC for legacy PIC/ISA IRQs\n");
+ legacy_pic->nr_legacy_irqs = NR_IRQS_LEGACY;
+ }
+#endif
}
Looking at the code more I do think that doing something like my hack is probably the way to deal with this.
Maybe something like this:
diff --git a/arch/ x86/kernel/ i8259.c b/arch/ x86/kernel/ i8259.c .2136e85dd5b0 100644 x86/kernel/ i8259.c x86/kernel/ i8259.c has(X86_ FEATURE_ ZEN)) { pic->nr_ legacy_ irqs = NR_IRQS_LEGACY;
index 30a55207c000.
--- a/arch/
+++ b/arch/
@@ -317,6 +317,16 @@ static int probe_8259A(void)
if (new_val != probe_val) {
printk(KERN_INFO "Using NULL legacy PIC\n");
legacy_pic = &null_legacy_pic;
+#ifdef CONFIG_X86_IO_APIC
+ /*
+ * Some AMD Zen based devices have the PIC disabled by the BIOS
+ * but they still use legacy ISA IRQs attached through the IOAPIC.
+ */
+ if (boot_cpu_
+ printk(KERN_INFO "Using IOAPIC for legacy PIC/ISA IRQs\n");
+ legacy_
+ }
+#endif
}
raw_spin_ unlock_ irqrestore( &i8259A_ lock, flags);
?