Skip to content

Commit 3cd9445

Browse files
Kefeng Wangarndb
authored andcommitted
asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr()
The asm-generic/io.h already has default definition, remove unnecessary arch's defination. Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Russell King <linux@armlinux.org.uk> Cc: Brian Cain <bcain@quicinc.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent aea7296 commit 3cd9445

9 files changed

Lines changed: 0 additions & 58 deletions

File tree

arch/alpha/include/asm/io.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
650650
#endif
651651
#define RTC_ALWAYS_BCD 0
652652

653-
/*
654-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
655-
* access
656-
*/
657-
#define xlate_dev_mem_ptr(p) __va(p)
658-
659653
/*
660654
* These get provided from <asm-generic/iomap.h> since alpha does not
661655
* select GENERIC_IOMAP.

arch/arm/include/asm/io.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,6 @@ struct pci_dev;
407407
#define pci_iounmap pci_iounmap
408408
extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
409409

410-
/*
411-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
412-
* access
413-
*/
414-
#define xlate_dev_mem_ptr(p) __va(p)
415-
416410
#include <asm-generic/io.h>
417411

418412
#ifdef CONFIG_MMU

arch/hexagon/include/asm/io.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ static inline void *phys_to_virt(unsigned long address)
5858
return __va(address);
5959
}
6060

61-
/*
62-
* convert a physical pointer to a virtual kernel pointer for
63-
* /dev/mem access.
64-
*/
65-
#define xlate_dev_mem_ptr(p) __va(p)
66-
6761
/*
6862
* IO port access primitives. Hexagon doesn't have special IO access
6963
* instructions; all I/O is memory mapped.

arch/m68k/include/asm/io_mm.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,6 @@ static inline void isa_delay(void)
389389

390390
#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1
391391

392-
/*
393-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
394-
* access
395-
*/
396-
#define xlate_dev_mem_ptr(p) __va(p)
397-
398392
#define readb_relaxed(addr) readb(addr)
399393
#define readw_relaxed(addr) readw(addr)
400394
#define readl_relaxed(addr) readl(addr)

arch/mips/include/asm/io.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
507507
#define csr_out32(v, a) (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST) = (v))
508508
#define csr_in32(a) (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST))
509509

510-
511510
#define __raw_readb __raw_readb
512511
#define __raw_readw __raw_readw
513512
#define __raw_readl __raw_readl
@@ -561,14 +560,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
561560
#define outsw outsw
562561
#define outsl outsl
563562

564-
565-
/*
566-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
567-
* access
568-
*/
569-
#define xlate_dev_mem_ptr(p) __va(p)
570-
#define unxlate_dev_mem_ptr(p, v) do { } while (0)
571-
572563
void __ioread64_copy(void *to, const void __iomem *from, size_t count);
573564

574565
#include <asm-generic/io.h>

arch/parisc/include/asm/io.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,6 @@ extern void iowrite64be(u64 val, void __iomem *addr);
265265
#define iowrite16_rep iowrite16_rep
266266
#define iowrite32_rep iowrite32_rep
267267

268-
/*
269-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
270-
* access
271-
*/
272-
#define xlate_dev_mem_ptr(p) __va(p)
273-
274268
extern int devmem_is_allowed(unsigned long pfn);
275269

276270
#include <asm-generic/io.h>

arch/powerpc/include/asm/io.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,12 +709,6 @@ static inline void name at \
709709
#define memcpy_fromio memcpy_fromio
710710
#define memcpy_toio memcpy_toio
711711

712-
/*
713-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
714-
* access
715-
*/
716-
#define xlate_dev_mem_ptr(p) __va(p)
717-
718712
/*
719713
* We don't do relaxed operations yet, at least not with this semantic
720714
*/

arch/sh/include/asm/io.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,6 @@ unsigned long long poke_real_address_q(unsigned long long addr,
302302
ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))
303303
#endif /* CONFIG_MMU */
304304

305-
/*
306-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
307-
* access
308-
*/
309-
#define xlate_dev_mem_ptr(p) __va(p)
310-
#define unxlate_dev_mem_ptr(p, v) do { } while (0)
311-
312305
#include <asm-generic/io.h>
313306

314307
#define ARCH_HAS_VALID_PHYS_ADDR_RANGE

arch/sparc/include/asm/io_64.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,6 @@ static inline int sbus_can_burst64(void)
469469
struct device;
470470
void sbus_set_sbus64(struct device *, int);
471471

472-
/*
473-
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
474-
* access
475-
*/
476-
#define xlate_dev_mem_ptr(p) __va(p)
477-
478472
#endif
479473

480474
#endif /* !(__SPARC64_IO_H) */

0 commit comments

Comments
 (0)