mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
x86/dma: Remove dma_alloc_coherent_mask()
These days all devices (including the ISA fallback device) have a coherent DMA mask set, so remove the workaround. Tested-by: Tom Lendacky <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Jon Mason <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Muli Ben-Yehuda <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
3eb93ea327
commit
038d07a283
4 changed files with 8 additions and 40 deletions
|
|
@ -53,20 +53,6 @@
|
|||
* API.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_X86
|
||||
static unsigned long dma_alloc_coherent_mask(struct device *dev,
|
||||
gfp_t gfp)
|
||||
{
|
||||
unsigned long dma_mask = 0;
|
||||
|
||||
dma_mask = dev->coherent_dma_mask;
|
||||
if (!dma_mask)
|
||||
dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32);
|
||||
|
||||
return dma_mask;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define XEN_SWIOTLB_ERROR_CODE (~(dma_addr_t)0x0)
|
||||
|
||||
static char *xen_io_tlb_start, *xen_io_tlb_end;
|
||||
|
|
@ -328,7 +314,7 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
|
|||
return ret;
|
||||
|
||||
if (hwdev && hwdev->coherent_dma_mask)
|
||||
dma_mask = dma_alloc_coherent_mask(hwdev, flags);
|
||||
dma_mask = hwdev->coherent_dma_mask;
|
||||
|
||||
/* At this point dma_handle is the physical address, next we are
|
||||
* going to set it to the machine address.
|
||||
|
|
|
|||
Loading…
Reference in a new issue