aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Stabellini <[email protected]>2014-11-21 11:10:39 +0000
committerDavid Vrabel <[email protected]>2014-12-04 12:41:56 +0000
commitc884227eaae9936f8ecbde6e1387bccdab5f4e90 (patch)
treea12fd8f936773ef95c601f9f1049c350c126a491
parentd6883e6f32e07ef2cc974753ba00927de099e6d7 (diff)
swiotlb-xen: remove BUG_ON in xen_bus_to_phys
On x86 truncation cannot occur because config XEN depends on X86_64 || (X86_32 && X86_PAE). On ARM truncation can occur without CONFIG_ARM_LPAE, when the dma operation involves foreign grants. However in that case the physical address returned by xen_bus_to_phys is actually invalid (there is no mfn to pfn tracking for foreign grants on ARM) and it is not used. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> CC: [email protected]
-rw-r--r--drivers/xen/swiotlb-xen.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 498b6544fd62..153cf1482125 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -96,8 +96,6 @@ static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT;
phys_addr_t paddr = dma;
- BUG_ON(paddr != dma); /* truncation has occurred, should never happen */
-
paddr |= baddr & ~PAGE_MASK;
return paddr;