Home
last modified time | relevance | path

Searched hist:ec5601661bfcdc206e6ceba1b97837e763dab1ba (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/iommu/arm/arm-smmu/
H A Dqcom_iommu.cdiff ec5601661bfcdc206e6ceba1b97837e763dab1ba Thu Jun 22 04:27:40 CDT 2023 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> iommu/qcom: Index contexts by asid number to allow asid 0

This driver was indexing the contexts by asid-1, which is probably
done under the assumption that the first ASID is always 1.
Unfortunately this is not always true: at least for MSM8956 and
MSM8976's GPU IOMMU, the gpu_user context's ASID number is zero.
To allow using a zero asid number, index the contexts by `asid`
instead of by `asid - 1`.

While at it, also enhance human readability by renaming the
`num_ctxs` member of struct qcom_iommu_dev to `max_asid`.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230622092742.74819-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Will Deacon <will@kernel.org>