Skip to content

Commit c6a1fd9

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen
On AMD Zen acpi_dev_irq_override() by default prefers the DSDT IRQ 1 settings over the MADT settings. This causes the keyboard to malfunction on some laptop models (see Links), all models from the Links have an INT_SRC_OVR MADT entry for IRQ 1. Fixes: a9c4a91 ("ACPI: resource: Remove "Zen" specific match and quirks") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217336 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217394 Link: https://bugzilla.kernel.org/show_bug.cgi?id=217406 Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9728ac2 commit c6a1fd9

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

arch/x86/include/asm/acpi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <asm/mpspec.h>
1616
#include <asm/x86_init.h>
1717
#include <asm/cpufeature.h>
18+
#include <asm/irq_vectors.h>
1819

1920
#ifdef CONFIG_ACPI_APEI
2021
# include <asm/pgtable_types.h>
@@ -31,6 +32,7 @@ extern int acpi_skip_timer_override;
3132
extern int acpi_use_timer_override;
3233
extern int acpi_fix_pin2_polarity;
3334
extern int acpi_disable_cmcff;
35+
extern bool acpi_int_src_ovr[NR_IRQS_LEGACY];
3436

3537
extern u8 acpi_sci_flags;
3638
extern u32 acpi_sci_override_gsi;

arch/x86/kernel/acpi/boot.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ int acpi_lapic;
5252
int acpi_ioapic;
5353
int acpi_strict;
5454
int acpi_disable_cmcff;
55+
bool acpi_int_src_ovr[NR_IRQS_LEGACY];
5556

5657
/* ACPI SCI override configuration */
5758
u8 acpi_sci_flags __initdata;
@@ -588,6 +589,9 @@ acpi_parse_int_src_ovr(union acpi_subtable_headers * header,
588589

589590
acpi_table_print_madt_entry(&header->common);
590591

592+
if (intsrc->source_irq < NR_IRQS_LEGACY)
593+
acpi_int_src_ovr[intsrc->source_irq] = true;
594+
591595
if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
592596
acpi_sci_ioapic_setup(intsrc->source_irq,
593597
intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,

drivers/acpi/resource.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,10 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
551551
if (gsi != 1 && gsi != 12)
552552
return true;
553553

554+
/* If the override comes from an INT_SRC_OVR MADT entry, honor it. */
555+
if (acpi_int_src_ovr[gsi])
556+
return true;
557+
554558
/*
555559
* IRQ override isn't needed on modern AMD Zen systems and
556560
* this override breaks active low IRQs on AMD Ryzen 6000 and

0 commit comments

Comments
 (0)