diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 22:10:37 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-06 22:10:37 +0300 |
commit | 93ed07a23fd08b8613f64cf0a15d7fbdaca010fd (patch) | |
tree | ef8da727c220b76b44fc33a12d8247ba5a2f300f /arch/alpha/kernel | |
parent | 18fd049731e67651009f316195da9281b756f2cf (diff) | |
parent | e19d4ebc536dadb607fe305fdaf48218d3e32d7c (diff) | |
download | linux-93ed07a23fd08b8613f64cf0a15d7fbdaca010fd.tar.xz |
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/alpha/kernel')
-rw-r--r-- | arch/alpha/kernel/core_marvel.c | 2 | ||||
-rw-r--r-- | arch/alpha/kernel/io.c | 17 | ||||
-rw-r--r-- | arch/alpha/kernel/machvec_impl.h | 2 |
3 files changed, 20 insertions, 1 deletions
diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c index 1efca79ac83c..6d0b3baf97ff 100644 --- a/arch/alpha/kernel/core_marvel.c +++ b/arch/alpha/kernel/core_marvel.c @@ -803,7 +803,7 @@ void __iomem *marvel_ioportmap (unsigned long addr) return (void __iomem *)addr; } -unsigned int +unsigned u8 marvel_ioread8(const void __iomem *xaddr) { unsigned long addr = (unsigned long) xaddr; diff --git a/arch/alpha/kernel/io.c b/arch/alpha/kernel/io.c index 838586abb1e0..eda09778268f 100644 --- a/arch/alpha/kernel/io.c +++ b/arch/alpha/kernel/io.c @@ -41,6 +41,15 @@ unsigned int ioread32(const void __iomem *addr) return ret; } +u64 ioread64(const void __iomem *addr) +{ + unsigned int ret; + mb(); + ret = IO_CONCAT(__IO_PREFIX,ioread64)(addr); + mb(); + return ret; +} + void iowrite8(u8 b, void __iomem *addr) { mb(); @@ -59,12 +68,20 @@ void iowrite32(u32 b, void __iomem *addr) IO_CONCAT(__IO_PREFIX,iowrite32)(b, addr); } +void iowrite64(u64 b, void __iomem *addr) +{ + mb(); + IO_CONCAT(__IO_PREFIX,iowrite64)(b, addr); +} + EXPORT_SYMBOL(ioread8); EXPORT_SYMBOL(ioread16); EXPORT_SYMBOL(ioread32); +EXPORT_SYMBOL(ioread64); EXPORT_SYMBOL(iowrite8); EXPORT_SYMBOL(iowrite16); EXPORT_SYMBOL(iowrite32); +EXPORT_SYMBOL(iowrite64); u8 inb(unsigned long port) { diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h index 393d5d6ca5d2..c2ebcb39e589 100644 --- a/arch/alpha/kernel/machvec_impl.h +++ b/arch/alpha/kernel/machvec_impl.h @@ -78,9 +78,11 @@ .mv_ioread8 = CAT(low,_ioread8), \ .mv_ioread16 = CAT(low,_ioread16), \ .mv_ioread32 = CAT(low,_ioread32), \ + .mv_ioread64 = CAT(low,_ioread64), \ .mv_iowrite8 = CAT(low,_iowrite8), \ .mv_iowrite16 = CAT(low,_iowrite16), \ .mv_iowrite32 = CAT(low,_iowrite32), \ + .mv_iowrite64 = CAT(low,_iowrite64), \ .mv_readb = CAT(low,_readb), \ .mv_readw = CAT(low,_readw), \ .mv_readl = CAT(low,_readl), \ |