Skip to content

Commit 1980105

Browse files
Maxim Levitskyjoergroedel
authored andcommitted
iommu/amd: X2apic mode: mask/unmask interrupts on suspend/resume
Use IRQCHIP_MASK_ON_SUSPEND to make the core irq code to mask the iommu interrupt on suspend and unmask it on the resume. Since now the unmask function updates the INTX settings, that will restore them on resume from s3/s4. Since IRQCHIP_MASK_ON_SUSPEND is only effective for interrupts which are not wakeup sources, remove IRQCHIP_SKIP_SET_WAKE flag and instead implement a dummy .irq_set_wake which doesn't allow the interrupt to become a wakeup source. Fixes: 6692981 ("iommu/amd: Add support for X2APIC IOMMU interrupts") Signed-off-by: Maxim Levitsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 4691f79 commit 1980105

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/iommu/amd/init.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,14 +2104,20 @@ static int intcapxt_set_affinity(struct irq_data *irqd,
21042104
return 0;
21052105
}
21062106

2107+
static int intcapxt_set_wake(struct irq_data *irqd, unsigned int on)
2108+
{
2109+
return on ? -EOPNOTSUPP : 0;
2110+
}
2111+
21072112
static struct irq_chip intcapxt_controller = {
21082113
.name = "IOMMU-MSI",
21092114
.irq_unmask = intcapxt_unmask_irq,
21102115
.irq_mask = intcapxt_mask_irq,
21112116
.irq_ack = irq_chip_ack_parent,
21122117
.irq_retrigger = irq_chip_retrigger_hierarchy,
21132118
.irq_set_affinity = intcapxt_set_affinity,
2114-
.flags = IRQCHIP_SKIP_SET_WAKE,
2119+
.irq_set_wake = intcapxt_set_wake,
2120+
.flags = IRQCHIP_MASK_ON_SUSPEND,
21152121
};
21162122

21172123
static const struct irq_domain_ops intcapxt_domain_ops = {

0 commit comments

Comments
 (0)