diff options
author | AngeloGioacchino Del Regno <[email protected]> | 2023-06-22 11:27:40 +0200 |
---|---|---|
committer | Will Deacon <[email protected]> | 2023-08-09 12:44:28 +0100 |
commit | ec5601661bfcdc206e6ceba1b97837e763dab1ba (patch) | |
tree | 1854fee46e7b0f9543528773dcbab2c114fa63f7 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 9f3fef23d9b5a858a6e6d5f478bb1b6b76265e76 (diff) |
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 <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions