From: Christoph Hellwig Date: Sat, 3 Apr 2021 17:51:05 +0000 (+0200) Subject: powerpc: stop implementing virt_to_bus X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fblock-bounce-removal;p=users%2Fhch%2Fblock.git powerpc: stop implementing virt_to_bus Now that the swim3 driver is converted to a local hack, there is no need to implement virt_to_bus for ppc32. Signed-off-by: Christoph Hellwig --- diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 386ae12d8523..a5cdf1d92c58 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -259,7 +259,6 @@ config PPC select SPARSE_IRQ select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK - select VIRT_TO_BUS if !PPC64 # # Please keep this list sorted alphabetically. # diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 273edd208ec5..65f032708958 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -944,34 +944,6 @@ static inline phys_addr_t page_to_phys(struct page *page) return PFN_PHYS(pfn); } -/* - * 32 bits still uses virt_to_bus() for it's implementation of DMA - * mappings se we have to keep it defined here. We also have some old - * drivers (shame shame shame) that use bus_to_virt() and haven't been - * fixed yet so I need to define it here. - */ -#ifdef CONFIG_PPC32 - -static inline unsigned long virt_to_bus(volatile void * address) -{ - if (address == NULL) - return 0; - return __pa(address) + PCI_DRAM_OFFSET; -} -#define virt_to_bus virt_to_bus - -static inline void * bus_to_virt(unsigned long address) -{ - if (address == 0) - return NULL; - return __va(address - PCI_DRAM_OFFSET); -} -#define bus_to_virt bus_to_virt - -#define page_to_bus(page) (page_to_phys(page) + PCI_DRAM_OFFSET) - -#endif /* CONFIG_PPC32 */ - /* access ports */ #define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) #define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v))