swiotlb: remove unnecessary swiotlb_bus_to_virt
swiotlb_bus_to_virt is unncessary; we can use swiotlb_bus_to_phys and phys_to_virt instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
This commit is contained in:
@@ -24,16 +24,6 @@
|
||||
int swiotlb __read_mostly;
|
||||
unsigned int ppc_swiotlb_enable;
|
||||
|
||||
void *swiotlb_bus_to_virt(struct device *hwdev, dma_addr_t addr)
|
||||
{
|
||||
unsigned long pfn = PFN_DOWN(swiotlb_bus_to_phys(hwdev, addr));
|
||||
void *pageaddr = page_address(pfn_to_page(pfn));
|
||||
|
||||
if (pageaddr != NULL)
|
||||
return pageaddr + (addr % PAGE_SIZE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, phys_addr_t paddr)
|
||||
{
|
||||
return paddr + get_dma_direct_offset(hwdev);
|
||||
|
Reference in New Issue
Block a user