[SRU][jammy/linux-aws][kinetic/linux-aws][PATCH 18/20] UBUNTU: SAUCE: xen: Only restore the ACPI SCI interrupt in xen_restore_pirqs.
Gerald Yang
gerald.yang at canonical.com
Wed Aug 17 08:51:48 UTC 2022
From: Frank van der Linden <fllinden at amazon.com>
BugLink: https://bugs.launchpad.net/bugs/1968062
Restoring all PIRQs, which is the right thing to do, was causing problems
on larger instances. This is a horrible workaround until this issue is fully
understood.
Signed-off-by: Frank van der Linden <fllinden at amazon.com>
Reviewed-by: Alakesh Haloi <alakeshh at amazon.com>
Reviewed-by: Anchal Agarwal <anchalag at amazon.com>
Reviewed-by: Qian Lu <luqia at amazon.com>
(cherry picked from commit 6eaed73fd397db40f80ee36abcfdf77dca0ca20a amazon-5.15.y/mainline)
Signed-off-by: Gerald Yang <gerald.yang at canonical.com>
Signed-off-by: Matthew Ruffell <matthew.ruffell at canonical.com>
---
drivers/xen/events/events_base.c | 42 +++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 0249e34104ac..775af2aa6dc8 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -66,6 +66,10 @@
#include <xen/xenbus.h>
#include <asm/hw_irq.h>
+#ifdef CONFIG_ACPI
+#include <linux/acpi.h>
+#endif
+
#include "events_internal.h"
#undef MODULE_PARAM_PREFIX
@@ -2145,9 +2149,45 @@ void xen_shutdown_pirqs(void)
}
}
+/*
+ * For now, only restore the ACPI SCI pirq.
+ */
void xen_restore_pirqs(void)
{
- restore_pirqs();
+#ifdef CONFIG_ACPI
+ int pirq, rc, irq, gsi;
+ struct physdev_map_pirq map_irq;
+ struct irq_info *info;
+
+ list_for_each_entry(info, &xen_irq_list_head, list) {
+ if (info->type != IRQT_PIRQ)
+ continue;
+
+ pirq = info->u.pirq.pirq;
+ gsi = info->u.pirq.gsi;
+ irq = info->irq;
+
+ if (gsi != acpi_gbl_FADT.sci_interrupt)
+ continue;
+
+ map_irq.domid = DOMID_SELF;
+ map_irq.type = MAP_PIRQ_TYPE_GSI;
+ map_irq.index = gsi;
+ map_irq.pirq = pirq;
+
+ rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
+ if (rc) {
+ pr_warn("xen: ACPI SCI interrupt map failed, rc=%d\n",
+ rc);
+ xen_free_irq(irq);
+ continue;
+ }
+
+ printk(KERN_DEBUG "xen: restored ACPI SCI interrupt\n");
+
+ __startup_pirq(irq);
+ }
+#endif
}
static struct irq_chip xen_dynamic_chip __read_mostly = {
--
2.34.1
More information about the kernel-team
mailing list