[PATCH 1/1] iommu/vt-d: Fix pointer cast warnings on 32 bit

Joerg Roedel joro at 8bytes.org
Tue May 19 12:09:12 UTC 2020


On Tue, May 19, 2020 at 09:34:23AM +0800, Lu Baolu wrote:
> Pointers should be casted to unsigned long to avoid "cast from pointer
> to integer of different size" warnings.
> 
> drivers/iommu/intel-pasid.c:818:6: warning:
>     cast from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/iommu/intel-pasid.c:821:9: warning:
>     cast from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/iommu/intel-pasid.c:824:23: warning:
>     cast from pointer to integer of different size [-Wpointer-to-int-cast]
> drivers/iommu/intel-svm.c:343:45: warning:
>     cast to pointer from integer of different size [-Wint-to-pointer-cast]
> 
> Fixes: d64d47f4f5678 ("iommu/vt-d: Add nested translation helper function")
> Fixes: a3bea1a35c083 ("iommu/vt-d: Add bind guest PASID support")
> Signed-off-by: Lu Baolu <baolu.lu at linux.intel.com>
> ---
>  drivers/iommu/intel-pasid.c | 8 ++++----
>  drivers/iommu/intel-svm.c   | 3 ++-
>  2 files changed, 6 insertions(+), 5 deletions(-)

Applied, thanks.

Btw, I think the PASID and Intel SVM code is pretty useless on 32 bit
anyway, no? It only supports 4 and 5 level page-tables, not the 2 and
3-level variants on 32-bit. Can you make it 64-bit only?


Regards,

	Joerg



More information about the iommu mailing list