Re: [PATCH 3/5] soc: qcom: mdt_loader: add qcom_mdt_pas_map/unmap_devmem_rscs()
From: Mukesh Ojha
Date: Tue May 26 2026 - 04:15:26 EST
On Tue, May 26, 2026 at 09:47:27AM +0300, Dmitry Baryshkov wrote:
> 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.
All the non-remoteproc client will be the user., I already mentioned
that video is one of user mentioned in the cover-letter.., will add
them as user once there base changes get picked.
>
> >
> > 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
--
-Mukesh Ojha