2023-05-06 23:31:46 +00:00
|
|
|
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
|
2023-05-07 10:48:34 +00:00
|
|
|
+++ linux-6.1.27/drivers/acpi/resource.c 2023-05-07 11:02:03.154416724 +0000
|
|
|
|
@@ -36,6 +36,28 @@ static inline bool
|
2023-05-07 10:25:09 +00:00
|
|
|
acpi_iospace_resource_valid(struct resource *res) { return true; }
|
|
|
|
#endif
|
2023-05-06 23:31:46 +00:00
|
|
|
|
2023-05-07 10:48:34 +00:00
|
|
|
+#ifdef CONFIG_X86
|
2023-05-07 10:25:09 +00:00
|
|
|
+/* 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 = {
|
2023-05-07 10:48:34 +00:00
|
|
|
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
|
|
|
|
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "AIR Plus"),
|
2023-05-07 10:25:09 +00:00
|
|
|
+ },
|
|
|
|
+ .callback = irq_override_fixup,
|
|
|
|
+ },
|
|
|
|
+ { }
|
|
|
|
+};
|
2023-05-07 10:48:34 +00:00
|
|
|
+#endif
|
2023-05-07 10:25:09 +00:00
|
|
|
+
|
|
|
|
#if IS_ENABLED(CONFIG_ACPI_GENERIC_GSI)
|
|
|
|
static inline bool is_gsi(struct acpi_resource_extended_irq *ext_irq)
|
|
|
|
{
|
2023-05-07 10:48:34 +00:00
|
|
|
@@ -542,7 +564,9 @@ static bool acpi_dev_irq_override(u32 gs
|
2023-05-07 10:25:09 +00:00
|
|
|
* this override breaks active low IRQs on AMD Ryzen 6000 and
|
|
|
|
* newer systems. Skip it.
|
|
|
|
*/
|
2023-05-06 23:31:46 +00:00
|
|
|
- if (boot_cpu_has(X86_FEATURE_ZEN))
|
2023-05-07 10:25:09 +00:00
|
|
|
+ dmi_check_system(resource_quirk_table);
|
|
|
|
+ if (boot_cpu_has(X86_FEATURE_ZEN) &&
|
|
|
|
+ needs_irq_override == false)
|
|
|
|
return false;
|
|
|
|
#endif
|
2023-05-06 23:31:46 +00:00
|
|
|
|
2023-05-07 10:48:34 +00:00
|
|
|
@@ -963,3 +987,4 @@ struct acpi_device *acpi_resource_consum
|
2023-05-07 10:25:09 +00:00
|
|
|
acpi_get_devices(NULL, acpi_res_consumer_cb, res, (void **) &consumer);
|
|
|
|
return consumer;
|
|
|
|
}
|
|
|
|
+
|