Skip to content

Commit

Permalink
mm: remove xlate_dev_kmem_ptr()
Browse files Browse the repository at this point in the history
Since /dev/kmem has been removed, let's remove the xlate_dev_kmem_ptr()
leftovers.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Russell King <[email protected]>
Cc: Brian Cain <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Cc: Rich Felker <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Mikulas Patocka <[email protected]>
Cc: Luc Van Oostenryck <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Palmer Dabbelt <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Greentime Hu <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Jiaxun Yang <[email protected]>
Cc: "Peter Zijlstra (Intel)" <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: Gerald Schaefer <[email protected]>
Cc: Niklas Schnelle <[email protected]>
Cc: Pierre Morel <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Kuninori Morimoto <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
davidhildenbrand authored and torvalds committed May 7, 2021
1 parent bbcd53c commit f2e762b
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 76 deletions.
5 changes: 0 additions & 5 deletions arch/alpha/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#endif /* __KERNEL__ */

#endif /* __ALPHA_IO_H */
5 changes: 0 additions & 5 deletions arch/arm/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#include <asm-generic/io.h>

#ifdef CONFIG_MMU
Expand Down
1 change: 0 additions & 1 deletion arch/hexagon/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ static inline void *phys_to_virt(unsigned long address)
* convert a physical pointer to a virtual kernel pointer for
* /dev/mem access.
*/
#define xlate_dev_kmem_ptr(p) __va(p)
#define xlate_dev_mem_ptr(p) __va(p)

/*
Expand Down
1 change: 0 additions & 1 deletion arch/ia64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ extern void memset_io(volatile void __iomem *s, int c, long n);
#define memcpy_fromio memcpy_fromio
#define memcpy_toio memcpy_toio
#define memset_io memset_io
#define xlate_dev_kmem_ptr xlate_dev_kmem_ptr
#define xlate_dev_mem_ptr xlate_dev_mem_ptr
#include <asm-generic/io.h>
#undef PCI_IOBASE
Expand Down
18 changes: 0 additions & 18 deletions arch/ia64/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,4 @@ xlate_dev_mem_ptr(phys_addr_t p)
return ptr;
}

/*
* Convert a virtual cached kernel memory pointer to an uncached pointer
*/
static __inline__ void *
xlate_dev_kmem_ptr(void *p)
{
struct page *page;
void *ptr;

page = virt_to_page((unsigned long)p);
if (PageUncached(page))
ptr = (void *)__pa(p) + __IA64_UNCACHED_OFFSET;
else
ptr = p;

return ptr;
}

#endif /* _ASM_IA64_UACCESS_H */
5 changes: 0 additions & 5 deletions arch/m68k/include/asm/io_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,6 @@ static inline void isa_delay(void)
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr)
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

void __ioread64_copy(void *to, const void __iomem *from, size_t count);

#endif /* _ASM_IO_H */
5 changes: 0 additions & 5 deletions arch/parisc/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,6 @@ extern void iowrite64be(u64 val, void __iomem *addr);
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

extern int devmem_is_allowed(unsigned long pfn);

#endif
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,6 @@ static inline void name at \
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

/*
* We don't do relaxed operations yet, at least not with this semantic
*/
Expand Down
5 changes: 0 additions & 5 deletions arch/s390/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ void *xlate_dev_mem_ptr(phys_addr_t phys);
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#define IO_SPACE_LIMIT 0

void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot);
Expand Down
5 changes: 0 additions & 5 deletions arch/sh/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,6 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
int valid_phys_addr_range(phys_addr_t addr, size_t size);
int valid_mmap_phys_addr_range(unsigned long pfn, size_t size);
Expand Down
5 changes: 0 additions & 5 deletions arch/sparc/include/asm/io_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,6 @@ void sbus_set_sbus64(struct device *, int);
*/
#define xlate_dev_mem_ptr(p) __va(p)

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#define xlate_dev_kmem_ptr(p) p

#endif

#endif /* !(__SPARC64_IO_H) */
11 changes: 0 additions & 11 deletions include/asm-generic/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -1064,17 +1064,6 @@ static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
#endif
#endif /* CONFIG_GENERIC_IOMAP */

/*
* Convert a virtual cached pointer to an uncached pointer
*/
#ifndef xlate_dev_kmem_ptr
#define xlate_dev_kmem_ptr xlate_dev_kmem_ptr
static inline void *xlate_dev_kmem_ptr(void *addr)
{
return addr;
}
#endif

#ifndef xlate_dev_mem_ptr
#define xlate_dev_mem_ptr xlate_dev_mem_ptr
static inline void *xlate_dev_mem_ptr(phys_addr_t addr)
Expand Down

0 comments on commit f2e762b

Please sign in to comment.