Comment 121 for bug 2034477

Revision history for this message
In , jwrdegoede (jwrdegoede-linux-kernel-bugs) wrote :

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
  }

  raw_spin_unlock_irqrestore(&i8259A_lock, flags);

?