Skip to content

Commit 6f910e4

Browse files
povikjannau
authored andcommitted
iommu: apple-dart: Link to consumers with blanket RPM_ACTIVE
Without the RPM_ACTIVE flag, runtime PM core only seems to consider the link insofar as it prevents the DART from suspending in case of consumers *considered active by runtime PM*. Other devices, like those on which runtime PM has yet to be enabled, or which lack any runtime PM support, are not considered in preventing the DART from suspending. DART going through suspend/resume cycle with active consumers can break the consumers' operation by the DART being reset in its resume path, among other things. Add RPM_ACTIVE flag to the link to have the consumer in the link prevent the DART from being suspended, unless the consumer itself is runtime PM suspended. This supersedes an earlier PCIe-only workaround. (TODO: Does this mean devices without bound drivers will keep their DARTs up indefinitely? This depends on the timing of the iommu probe_device/release_device calls. Investigate.) Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
1 parent 21edbbf commit 6f910e4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/iommu/apple-dart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,9 @@ static struct iommu_device *apple_dart_probe_device(struct device *dev)
852852
return ERR_PTR(-ENODEV);
853853

854854
for_each_stream_map(i, cfg, stream_map)
855-
device_link_add(
856-
dev, stream_map->dart->dev,
857-
DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_SUPPLIER);
855+
device_link_add(dev, stream_map->dart->dev,
856+
DL_FLAG_PM_RUNTIME | DL_FLAG_AUTOREMOVE_SUPPLIER |
857+
DL_FLAG_RPM_ACTIVE);
858858

859859
return &cfg->stream_maps[0].dart->iommu;
860860
}

0 commit comments

Comments
 (0)