* [PATCH] ACPI: RIMT: Add dependency between iommu and devices
@ 2026-03-03 6:16 Sunil V L
2026-03-31 23:39 ` Paul Walmsley
0 siblings, 1 reply; 2+ messages in thread
From: Sunil V L @ 2026-03-03 6:16 UTC (permalink / raw)
To: linux-kernel, linux-riscv, linux-acpi
Cc: Rafael J . Wysocki, Len Brown, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Anup Patel, Andrew Jones, Anup Patel,
Sunil V L
From: Sunil V L <sunilvl@oss.qualcomm.com>
EPROBE_DEFER ensures IOMMU devices are probed before the devices that
depend on them. During shutdown, however, the IOMMU may be removed
first, leading to issues. To avoid this, a device link is added
which enforces the correct removal order.
Fixes: 8f7729552582 ("ACPI: RISC-V: Add support for RIMT")
Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
---
drivers/acpi/riscv/rimt.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/acpi/riscv/rimt.c b/drivers/acpi/riscv/rimt.c
index 7f423405e5ef..8eaa8731bddd 100644
--- a/drivers/acpi/riscv/rimt.c
+++ b/drivers/acpi/riscv/rimt.c
@@ -263,6 +263,13 @@ static int rimt_iommu_xlate(struct device *dev, struct acpi_rimt_node *node, u32
if (!rimt_fwnode)
return -EPROBE_DEFER;
+ /*
+ * EPROBE_DEFER ensures IOMMU is probed before the devices that
+ * depend on them. During shutdown, however, the IOMMU may be removed
+ * first, leading to issues. To avoid this, a device link is added
+ * which enforces the correct removal order.
+ */
+ device_link_add(dev, rimt_fwnode->dev, DL_FLAG_AUTOREMOVE_CONSUMER);
return acpi_iommu_fwspec_init(dev, deviceid, rimt_fwnode);
}
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ACPI: RIMT: Add dependency between iommu and devices
2026-03-03 6:16 [PATCH] ACPI: RIMT: Add dependency between iommu and devices Sunil V L
@ 2026-03-31 23:39 ` Paul Walmsley
0 siblings, 0 replies; 2+ messages in thread
From: Paul Walmsley @ 2026-03-31 23:39 UTC (permalink / raw)
To: Sunil V L
Cc: linux-kernel, linux-riscv, linux-acpi, Rafael J . Wysocki,
Len Brown, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Anup Patel, Andrew Jones, Anup Patel
On Tue, 3 Mar 2026, Sunil V L wrote:
> From: Sunil V L <sunilvl@oss.qualcomm.com>
>
> EPROBE_DEFER ensures IOMMU devices are probed before the devices that
> depend on them. During shutdown, however, the IOMMU may be removed
> first, leading to issues. To avoid this, a device link is added
> which enforces the correct removal order.
>
> Fixes: 8f7729552582 ("ACPI: RISC-V: Add support for RIMT")
> Signed-off-by: Sunil V L <sunilvl@oss.qualcomm.com>
Thanks, queued for v7.0-rc. Something that would be helpful in the
future, by the way, is if you would describe the issues observed in
greater detail.
- Paul
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-31 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 6:16 [PATCH] ACPI: RIMT: Add dependency between iommu and devices Sunil V L
2026-03-31 23:39 ` Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®