]>
Commit | Line | Data |
---|---|---|
0507c325 GKH |
1 | From c884227eaae9936f8ecbde6e1387bccdab5f4e90 Mon Sep 17 00:00:00 2001 |
2 | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> | |
3 | Date: Fri, 21 Nov 2014 11:10:39 +0000 | |
4 | Subject: swiotlb-xen: remove BUG_ON in xen_bus_to_phys | |
5 | ||
6 | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> | |
7 | ||
8 | commit c884227eaae9936f8ecbde6e1387bccdab5f4e90 upstream. | |
9 | ||
10 | On x86 truncation cannot occur because config XEN depends on X86_64 || | |
11 | (X86_32 && X86_PAE). | |
12 | ||
13 | On ARM truncation can occur without CONFIG_ARM_LPAE, when the dma | |
14 | operation involves foreign grants. However in that case the physical | |
15 | address returned by xen_bus_to_phys is actually invalid (there is no mfn | |
16 | to pfn tracking for foreign grants on ARM) and it is not used. | |
17 | ||
18 | Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> | |
19 | Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> | |
20 | Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | ||
23 | --- | |
24 | drivers/xen/swiotlb-xen.c | 2 -- | |
25 | 1 file changed, 2 deletions(-) | |
26 | ||
27 | --- a/drivers/xen/swiotlb-xen.c | |
28 | +++ b/drivers/xen/swiotlb-xen.c | |
29 | @@ -96,8 +96,6 @@ static inline phys_addr_t xen_bus_to_phy | |
30 | dma_addr_t dma = (dma_addr_t)pfn << PAGE_SHIFT; | |
31 | phys_addr_t paddr = dma; | |
32 | ||
33 | - BUG_ON(paddr != dma); /* truncation has occurred, should never happen */ | |
34 | - | |
35 | paddr |= baddr & ~PAGE_MASK; | |
36 | ||
37 | return paddr; |