Skip to content
Snippets Groups Projects
Commit 9605ad16 authored by James Morse's avatar James Morse
Browse files

iommu: Add helpers to walk iommu_group and access corresponding ops


ARM SMMU with MPAM support are able to mark streams of traffic with
the QoS labels MPAM uses. The user-space interface for MPAM is the
resctrl filesystem, which allows threads to be moved between groups,
its natural to do the same for iommu_groups.

The resctrl interface lists threads, so will also need to list
iommu_groups, it will be necessary to walk the list of iommu_groups.
To ensure this matches what user-space sees via sysfs, it is best
to walk the kobjects.

Add iommu_group_get_kset() to allow resctrl to retrieve the set of
iommu_groups.

Split the kobject-to-group code out of iommu_group_get_by_id() and
expose it as iommu_group_get_from_kobj(), to allow resctrl to get
the iommu_group from the kobject it already has when walking.

Finally, add iommu_group_get_ops() to allow the iommu ops for a
group to be retrieved. The MPAM driver will use this with the
iommu_group from resctrl to call the get/set methods provided by
the iommu.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
parent bd13f847
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment