]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu-common: Fix error code used in iommu_tbl_range_{alloc,free}().
authorDavid S. Miller <davem@davemloft.net>
Wed, 4 Nov 2015 19:30:57 +0000 (11:30 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 27 Nov 2016 20:25:51 +0000 (12:25 -0800)
commite9e3a7b8892ab51ea8d67ecc7e3c9a8a286df17b
tree22024fc8f47acd50590c9e2dc03e8cc60ed8a51c
parent1576398adfc90866f09f5bfc4ee1f89ce072711d
iommu-common: Fix error code used in iommu_tbl_range_{alloc,free}().

The value returned from iommu_tbl_range_alloc() (and the one passed
in as a fourth argument to iommu_tbl_range_free) is not a DMA address,
it is rather an index into the IOMMU page table.

Therefore using DMA_ERROR_CODE is not appropriate.

Use a more type matching error code define, IOMMU_ERROR_CODE, and
update all users of this interface.

Orabug: 25159279

Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/iommu.c
arch/sparc/kernel/ldc.c
arch/sparc/kernel/pci_sun4v.c
include/linux/iommu-common.h
lib/iommu-common.c