mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
ACPI: RIMT: Only defer the IOMMU configuration in init stage
The IOMMU configuration will be deferred if the IOMMU driver
isn't probed by the time. Make this deferral only in the
initialization stage with driver_deferred_probe_check_state().
Otherwise the devices depends on IOMMU will be deferred forever
in case the IOMMU device probe failed or it doesn't appear in
the ACPI namespace.
Fixes: 8f77295525 ("ACPI: RISC-V: Add support for RIMT")
Signed-off-by: Yicong Yang <yang.yicong@picoheart.com>
Link: https://patch.msgid.link/20260625094702.11558-1-yang.yicong@picoheart.com
[pjw@kernel.org: added Fixes line]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
parent
c8c5a7835f
commit
b8f62414fa
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/acpi_rimt.h>
|
||||
#include <linux/device/driver.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/pci.h>
|
||||
|
|
@ -257,11 +258,11 @@ static int rimt_iommu_xlate(struct device *dev, struct acpi_rimt_node *node, u32
|
|||
rimt_fwnode = rimt_get_fwnode(node);
|
||||
|
||||
/*
|
||||
* The IOMMU drivers may not be probed yet.
|
||||
* Defer the IOMMU configuration
|
||||
* The IOMMU drivers may not be probed yet. Defer the IOMMU
|
||||
* configuration if it's still in initialization stage.
|
||||
*/
|
||||
if (!rimt_fwnode)
|
||||
return -EPROBE_DEFER;
|
||||
return driver_deferred_probe_check_state(dev);
|
||||
|
||||
/*
|
||||
* EPROBE_DEFER ensures IOMMU is probed before the devices that
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user