Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ACPI: RIMT: Add dependency between iommu and devices

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>
Link: https://patch.msgid.link/20260303061605.722949-1-sunilvl@oss.qualcomm.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Sunil V L and committed by
Paul Walmsley
91565852 511361fe

+7
+7
drivers/acpi/riscv/rimt.c
··· 263 263 if (!rimt_fwnode) 264 264 return -EPROBE_DEFER; 265 265 266 + /* 267 + * EPROBE_DEFER ensures IOMMU is probed before the devices that 268 + * depend on them. During shutdown, however, the IOMMU may be removed 269 + * first, leading to issues. To avoid this, a device link is added 270 + * which enforces the correct removal order. 271 + */ 272 + device_link_add(dev, rimt_fwnode->dev, DL_FLAG_AUTOREMOVE_CONSUMER); 266 273 return acpi_iommu_fwspec_init(dev, deviceid, rimt_fwnode); 267 274 } 268 275