Re: [PATCH 3/5] soc: qcom: mdt_loader: add qcom_mdt_pas_map/unmap_devmem_rscs()
From: Dmitry Baryshkov
Date: Tue May 26 2026 - 02:48:56 EST
On Wed, May 06, 2026 at 10:31:05AM +0530, Mukesh Ojha wrote:
> Add qcom_mdt_pas_map_devmem_rscs() and qcom_mdt_pas_unmap_devmem_rscs()
> to IOMMU map/unmap RSC_DEVMEM resource table entries on SoCs where Linux
> runs as hypervisor at EL2 and owns the IOMMU mappings for remote
> processors.
Generic rule is 'no API without users'. Please provide a driver using
these functions.
>
> The map function fetches the resource table via
> qcom_scm_pas_get_rsc_table() and iterates over RSC_DEVMEM entries using
> rsc_table_for_each_entry(), calling iommu_map() for each. Mapped entries
> are tracked in a per-PAS linked list stored in a hash table keyed by
> pas_id for later lookup by the unmap function.
>
> Signed-off-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
> ---
> drivers/soc/qcom/mdt_loader.c | 189 ++++++++++++++++++++++++++++
> include/linux/soc/qcom/mdt_loader.h | 22 ++++
> 2 files changed, 211 insertions(+)
>
--
With best wishes
Dmitry