mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 17:11:33 +00:00
ACPI fixes for 6.5-rc6
Rework the handling of interrupt overrides on AMD Zen-based machines to avoid recently introduced regressions (Hans de Goede). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmTWgQMSHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxaggP/iYft7/0saIW/gQEWUngTdwwYpDdL5c6 cnym9fO7dNvZ7svGgv1oQj3Nge79hWWWKTOVB5F3ZKPEmYHlhAekSYb+SI+/YUcp fpIyVKO/y8nO+Cnw5t9EoTteJ65WJaadBNTuRUw28j4ETs/4AewWFFXSogzO2IIU x4UoWPHEXhhjYTnYL+ivRAKJG5iTIbfQS16muO7p2z630FneUYGDvUxx0XuIvbf0 dXVjKi/rxgfozNyL8HmyeDE3LSjG1b7h7h6MS/ZrdM2LoE4V2pp/Z7qtxs53sIeG Y+dsBZEp8G/YReuMPush31Sgepf6l4OQpjKkq54vRMD6su36IMojMYXayLWHmWK7 RP7n896takZ80tC7GH/pDJUUCoiyvE08/RUxnwg8QPCj5PCMmp2w0/DhhYi1FeFD 4QxYx7UBYGGFy94Bx97LvBVZXM484F8CJnQreXm7csniy0BME5MeV6S6YNjXsXJH M+O0uwdlk24g4SH7E21jUQl6Ch+YtbcH0LRtivGnC6YkcItWkcNRccph3H27wNHH jMR43tJsWp6yjXeyWw+vrML9VZ0aK3yyUKPAqcXhC4aIp8DSgVaVuLdRwXHmBqK5 Phx5+7zuxJ4UpOAQb1RtFOCgRAtfNN57QaXJ0hPuOuzopVOWPHjmcuw4fUdW5YCG esjxuO9VAyQZ =4kD6 -----END PGP SIGNATURE----- Merge tag 'acpi-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Rework the handling of interrupt overrides on AMD Zen-based machines to avoid recently introduced regressions (Hans de Goede). Note that this is intended as a short-term mitigation for 6.5 and the long-term approach will be to attempt to use the configuration left by the BIOS, but it requires more investigation" * tag 'acpi-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: resource: Add IRQ override quirk for PCSpecialist Elimina Pro 16 M ACPI: resource: Honor MADT INT_SRC_OVR settings for IRQ1 on AMD Zen ACPI: resource: Always use MADT override IRQ settings for all legacy non i8042 IRQs ACPI: resource: revert "Remove "Zen" specific match and quirks"
This commit is contained in:
commit
29d99aae13
@ -15,6 +15,7 @@
|
||||
#include <asm/mpspec.h>
|
||||
#include <asm/x86_init.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/irq_vectors.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
# include <asm/pgtable_types.h>
|
||||
@ -31,6 +32,7 @@ extern int acpi_skip_timer_override;
|
||||
extern int acpi_use_timer_override;
|
||||
extern int acpi_fix_pin2_polarity;
|
||||
extern int acpi_disable_cmcff;
|
||||
extern bool acpi_int_src_ovr[NR_IRQS_LEGACY];
|
||||
|
||||
extern u8 acpi_sci_flags;
|
||||
extern u32 acpi_sci_override_gsi;
|
||||
|
@ -52,6 +52,7 @@ int acpi_lapic;
|
||||
int acpi_ioapic;
|
||||
int acpi_strict;
|
||||
int acpi_disable_cmcff;
|
||||
bool acpi_int_src_ovr[NR_IRQS_LEGACY];
|
||||
|
||||
/* ACPI SCI override configuration */
|
||||
u8 acpi_sci_flags __initdata;
|
||||
@ -588,6 +589,9 @@ acpi_parse_int_src_ovr(union acpi_subtable_headers * header,
|
||||
|
||||
acpi_table_print_madt_entry(&header->common);
|
||||
|
||||
if (intsrc->source_irq < NR_IRQS_LEGACY)
|
||||
acpi_int_src_ovr[intsrc->source_irq] = true;
|
||||
|
||||
if (intsrc->source_irq == acpi_gbl_FADT.sci_interrupt) {
|
||||
acpi_sci_ioapic_setup(intsrc->source_irq,
|
||||
intsrc->inti_flags & ACPI_MADT_POLARITY_MASK,
|
||||
|
@ -470,6 +470,45 @@ static const struct dmi_system_id asus_laptop[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct dmi_system_id tongfang_gm_rg[] = {
|
||||
{
|
||||
.ident = "TongFang GMxRGxx/XMG CORE 15 (M22)/TUXEDO Stellaris 15 Gen4 AMD",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct dmi_system_id maingear_laptop[] = {
|
||||
{
|
||||
.ident = "MAINGEAR Vector Pro 2 15",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-15A3070T"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "MAINGEAR Vector Pro 2 17",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Micro Electronics Inc"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MG-VCP2-17A3070T"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct dmi_system_id pcspecialist_laptop[] = {
|
||||
{
|
||||
.ident = "PCSpecialist Elimina Pro 16 M",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "PCSpecialist"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Elimina Pro 16 M"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static const struct dmi_system_id lg_laptop[] = {
|
||||
{
|
||||
.ident = "LG Electronics 17U70P",
|
||||
@ -493,6 +532,9 @@ struct irq_override_cmp {
|
||||
static const struct irq_override_cmp override_table[] = {
|
||||
{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
|
||||
{ asus_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
|
||||
{ tongfang_gm_rg, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
|
||||
{ maingear_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
|
||||
{ pcspecialist_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, true },
|
||||
{ lg_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0, false },
|
||||
};
|
||||
|
||||
@ -512,6 +554,28 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
|
||||
return entry->override;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
/*
|
||||
* Always use the MADT override info, except for the i8042 PS/2 ctrl
|
||||
* IRQs (1 and 12). For these the DSDT IRQ settings should sometimes
|
||||
* be used otherwise PS/2 keyboards / mice will not work.
|
||||
*/
|
||||
if (gsi != 1 && gsi != 12)
|
||||
return true;
|
||||
|
||||
/* If the override comes from an INT_SRC_OVR MADT entry, honor it. */
|
||||
if (acpi_int_src_ovr[gsi])
|
||||
return true;
|
||||
|
||||
/*
|
||||
* IRQ override isn't needed on modern AMD Zen systems and
|
||||
* this override breaks active low IRQs on AMD Ryzen 6000 and
|
||||
* newer systems. Skip it.
|
||||
*/
|
||||
if (boot_cpu_has(X86_FEATURE_ZEN))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user