diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 12:10:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 12:10:37 -0700 |
commit | 93ed07a23fd08b8613f64cf0a15d7fbdaca010fd (patch) | |
tree | ef8da727c220b76b44fc33a12d8247ba5a2f300f /arch/sparc | |
parent | 18fd049731e67651009f316195da9281b756f2cf (diff) | |
parent | e19d4ebc536dadb607fe305fdaf48218d3e32d7c (diff) | |
download | linux-rpi-93ed07a23fd08b8613f64cf0a15d7fbdaca010fd.tar.gz linux-rpi-93ed07a23fd08b8613f64cf0a15d7fbdaca010fd.tar.bz2 linux-rpi-93ed07a23fd08b8613f64cf0a15d7fbdaca010fd.zip |
Merge tag 'asm-generic-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic updates from Arnd Bergmann:
"This contains a series from Linus Walleij to unify the linux/io.h
interface by making the ia64, alpha, parisc and sparc include
asm-generic/io.h.
All functions provided by the generic header are now available to all
drivers, but the architectures can still override this.
For the moment, mips and sh still don't include asm-generic/io.h but
provide a full set of functions themselves.
There are also a few minor cleanups unrelated to this"
* tag 'asm-generic-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
alpha: add full ioread64/iowrite64 implementation
parisc: Drop homebrewn io[read|write]64_[lo_hi|hi_lo]
parisc: hide ioread64 declaration on 32-bit
ia64: export memory_add_physaddr_to_nid to fix cxl build error
asm-generic: Remove empty #ifdef SA_RESTORER
parisc: Use the generic IO helpers
parisc: Remove 64bit access on 32bit machines
sparc: Fix the generic IO helpers
alpha: Use generic <asm-generic/io.h>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/io.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/io_64.h | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/io.h b/arch/sparc/include/asm/io.h index 2eefa526b38f..2dad9be9ec75 100644 --- a/arch/sparc/include/asm/io.h +++ b/arch/sparc/include/asm/io.h @@ -19,4 +19,6 @@ #define writel_be(__w, __addr) __raw_writel(__w, __addr) #define writew_be(__l, __addr) __raw_writew(__l, __addr) +#include <asm-generic/io.h> + #endif diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h index 5ffa820dcd4d..9303270b22f3 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h @@ -9,6 +9,7 @@ #include <asm/page.h> /* IO address mapping routines need this */ #include <asm/asi.h> #include <asm-generic/pci_iomap.h> +#define pci_iomap pci_iomap /* BIO layer definitions. */ extern unsigned long kern_base, kern_size; @@ -239,38 +240,51 @@ static inline void outl(u32 l, unsigned long addr) void outsb(unsigned long, const void *, unsigned long); void outsw(unsigned long, const void *, unsigned long); void outsl(unsigned long, const void *, unsigned long); +#define outsb outsb +#define outsw outsw +#define outsl outsl void insb(unsigned long, void *, unsigned long); void insw(unsigned long, void *, unsigned long); void insl(unsigned long, void *, unsigned long); +#define insb insb +#define insw insw +#define insl insl static inline void readsb(void __iomem *port, void *buf, unsigned long count) { insb((unsigned long __force)port, buf, count); } +#define readsb readsb + static inline void readsw(void __iomem *port, void *buf, unsigned long count) { insw((unsigned long __force)port, buf, count); } +#define readsw readsw static inline void readsl(void __iomem *port, void *buf, unsigned long count) { insl((unsigned long __force)port, buf, count); } +#define readsl readsl static inline void writesb(void __iomem *port, const void *buf, unsigned long count) { outsb((unsigned long __force)port, buf, count); } +#define writesb writesb static inline void writesw(void __iomem *port, const void *buf, unsigned long count) { outsw((unsigned long __force)port, buf, count); } +#define writesw writesw static inline void writesl(void __iomem *port, const void *buf, unsigned long count) { outsl((unsigned long __force)port, buf, count); } +#define writesl writesl #define ioread8_rep(p,d,l) readsb(p,d,l) #define ioread16_rep(p,d,l) readsw(p,d,l) @@ -344,6 +358,7 @@ static inline void memset_io(volatile void __iomem *dst, int c, __kernel_size_t d++; } } +#define memset_io memset_io static inline void sbus_memcpy_fromio(void *dst, const volatile void __iomem *src, __kernel_size_t n) @@ -369,6 +384,7 @@ static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, src++; } } +#define memcpy_fromio memcpy_fromio static inline void sbus_memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t n) @@ -395,6 +411,7 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, d++; } } +#define memcpy_toio memcpy_toio #ifdef __KERNEL__ @@ -412,7 +429,9 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size) static inline void __iomem *ioremap_np(unsigned long offset, unsigned long size) { return NULL; + } +#define ioremap_np ioremap_np static inline void iounmap(volatile void __iomem *addr) { @@ -432,10 +451,13 @@ static inline void iounmap(volatile void __iomem *addr) /* Create a virtual mapping cookie for an IO port range */ void __iomem *ioport_map(unsigned long port, unsigned int nr); void ioport_unmap(void __iomem *); +#define ioport_map ioport_map +#define ioport_unmap ioport_unmap /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ struct pci_dev; void pci_iounmap(struct pci_dev *dev, void __iomem *); +#define pci_iounmap pci_iounmap static inline int sbus_can_dma_64bit(void) { |