Merge pull request #1401 from fewtarius/dev
Patch IRQ override to use quirks.
This commit is contained in:
commit
32f54882b6
1 changed files with 41 additions and 26 deletions
|
@ -1,31 +1,46 @@
|
|||
This patch reverts IRQ override functionality added for modern Zen systems to enable
|
||||
proper IRQ routing on the AYANEO Air Plus and probably other devices.
|
||||
|
||||
Reverts:
|
||||
https://lore.kernel.org/all/20220712020058.90374-1-gch981213@gmail.com/
|
||||
|
||||
Kernel.org Bugzilla:
|
||||
https://bugzilla.kernel.org/show_bug.cgi?id=217394
|
||||
|
||||
Thanks to @pastaq for the DSDT patch which led to this finding.
|
||||
|
||||
diff -rupN linux-6.1.27.orig/drivers/acpi/resource.c linux-6.1.27/drivers/acpi/resource.c
|
||||
--- linux-6.1.27.orig/drivers/acpi/resource.c 2023-05-01 20:39:27.376399763 +0000
|
||||
+++ linux-6.1.27/drivers/acpi/resource.c 2023-05-06 23:13:03.124444529 +0000
|
||||
@@ -536,16 +536,6 @@ static bool acpi_dev_irq_override(u32 gs
|
||||
return entry->override;
|
||||
}
|
||||
+++ linux-6.1.27/drivers/acpi/resource.c 2023-05-07 10:11:36.324503603 +0000
|
||||
@@ -36,6 +36,26 @@ static inline bool
|
||||
acpi_iospace_resource_valid(struct resource *res) { return true; }
|
||||
#endif
|
||||
|
||||
-#ifdef CONFIG_X86
|
||||
- /*
|
||||
- * 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.
|
||||
- */
|
||||
+/* Enable a quirk to allow override on some AMD 6800 series devices */
|
||||
+static bool needs_irq_override = false;
|
||||
+
|
||||
+static int __init irq_override_fixup(const struct dmi_system_id *id)
|
||||
+{
|
||||
+ needs_irq_override = true;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static const struct dmi_system_id resource_quirk_table[] __initconst = {
|
||||
+ {
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "AYANEO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "AIR Plus"),
|
||||
+ },
|
||||
+ .callback = irq_override_fixup,
|
||||
+ },
|
||||
+ { }
|
||||
+};
|
||||
+
|
||||
#if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI)
|
||||
static inline bool is_gsi(struct acpi_resource_extended_irq *ext_irq)
|
||||
{
|
||||
@@ -542,7 +562,9 @@ static bool acpi_dev_irq_override(u32 gs
|
||||
* 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;
|
||||
}
|
||||
+ dmi_check_system(resource_quirk_table);
|
||||
+ if (boot_cpu_has(X86_FEATURE_ZEN) &&
|
||||
+ needs_irq_override == false)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -963,3 +985,4 @@ struct acpi_device *acpi_resource_consum
|
||||
acpi_get_devices(NULL, acpi_res_consumer_cb, res, (void **) &consumer);
|
||||
return consumer;
|
||||
}
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue