diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-27 09:46:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-03-27 09:46:53 -0700 |
commit | 3a90a72aca0a98125f0c7350ffb7cc63665f8047 (patch) | |
tree | f05c5a54a7eb69c99865dc44cfe6961bcd8fb717 /lib | |
parent | 3536cb1e5753a832f88c268e328c644f6e367980 (diff) | |
parent | 47a60391ae0ed04ffbb9bd8dcd94ad9d08b41288 (diff) |
Merge tag 'asm-generic-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic
Pull asm-generic updates from Arnd Bergmann:
"This is mainly set of cleanups of asm-generic/io.h, resolving problems
with inconsistent semantics of ioread64/iowrite64 that were causing
runtime and build issues.
The "GENERIC_IOMAP" version that switches between inb()/outb() and
readb()/writeb() style accessors is now only used on architectures
that have PC-style ISA devices that are not memory mapped (x86, uml,
m68k-q40 and powerpc-powernv), while alpha and parisc use a more
complicated variant and everything else just maps the ioread
interfaces to plan MMIO (readb/writeb etc).
In addition there are two small changes from Raag Jadav to simplify
the asm-generic/io.h indirect inclusions and from Jann Horn to fix a
corner case with read_word_at_a_time"
* tag 'asm-generic-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
rwonce: fix crash by removing READ_ONCE() for unaligned read
rwonce: handle KCSAN like KASAN in read_word_at_a_time()
m68k: coldfire: select PCI_IOMAP for PCI
mips: export pci_iounmap()
mips: fix PCI_IOBASE definition
m68k/nommu: stop using GENERIC_IOMAP
mips: drop GENERIC_IOMAP wrapper
powerpc: asm/io.h: remove split ioread64/iowrite64 helpers
parisc: stop using asm-generic/iomap.h
sh: remove duplicate ioread/iowrite helpers
alpha: stop using asm-generic/iomap.h
io.h: drop unused headers
drm/draw: include missing headers
asm-generic/io.h: rework split ioread64/iowrite64 helpers
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iomap.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/iomap.c b/lib/iomap.c index 4f8b31baa575..a65717cd86f7 100644 --- a/lib/iomap.c +++ b/lib/iomap.c @@ -111,7 +111,7 @@ EXPORT_SYMBOL(ioread16be); EXPORT_SYMBOL(ioread32); EXPORT_SYMBOL(ioread32be); -#ifdef readq +#ifdef CONFIG_64BIT static u64 pio_read64_lo_hi(unsigned long port) { u64 lo, hi; @@ -153,21 +153,21 @@ static u64 pio_read64be_hi_lo(unsigned long port) } __no_kmsan_checks -u64 ioread64_lo_hi(const void __iomem *addr) +u64 __ioread64_lo_hi(const void __iomem *addr) { IO_COND(addr, return pio_read64_lo_hi(port), return readq(addr)); return 0xffffffffffffffffULL; } __no_kmsan_checks -u64 ioread64_hi_lo(const void __iomem *addr) +u64 __ioread64_hi_lo(const void __iomem *addr) { IO_COND(addr, return pio_read64_hi_lo(port), return readq(addr)); return 0xffffffffffffffffULL; } __no_kmsan_checks -u64 ioread64be_lo_hi(const void __iomem *addr) +u64 __ioread64be_lo_hi(const void __iomem *addr) { IO_COND(addr, return pio_read64be_lo_hi(port), return mmio_read64be(addr)); @@ -175,19 +175,19 @@ u64 ioread64be_lo_hi(const void __iomem *addr) } __no_kmsan_checks -u64 ioread64be_hi_lo(const void __iomem *addr) +u64 __ioread64be_hi_lo(const void __iomem *addr) { IO_COND(addr, return pio_read64be_hi_lo(port), return mmio_read64be(addr)); return 0xffffffffffffffffULL; } -EXPORT_SYMBOL(ioread64_lo_hi); -EXPORT_SYMBOL(ioread64_hi_lo); -EXPORT_SYMBOL(ioread64be_lo_hi); -EXPORT_SYMBOL(ioread64be_hi_lo); +EXPORT_SYMBOL(__ioread64_lo_hi); +EXPORT_SYMBOL(__ioread64_hi_lo); +EXPORT_SYMBOL(__ioread64be_lo_hi); +EXPORT_SYMBOL(__ioread64be_hi_lo); -#endif /* readq */ +#endif /* CONFIG_64BIT */ #ifndef pio_write16be #define pio_write16be(val,port) outw(swab16(val),port) @@ -236,7 +236,7 @@ EXPORT_SYMBOL(iowrite16be); EXPORT_SYMBOL(iowrite32); EXPORT_SYMBOL(iowrite32be); -#ifdef writeq +#ifdef CONFIG_64BIT static void pio_write64_lo_hi(u64 val, unsigned long port) { outl(val, port); @@ -261,7 +261,7 @@ static void pio_write64be_hi_lo(u64 val, unsigned long port) pio_write32be(val, port + sizeof(u32)); } -void iowrite64_lo_hi(u64 val, void __iomem *addr) +void __iowrite64_lo_hi(u64 val, void __iomem *addr) { /* Make sure uninitialized memory isn't copied to devices. */ kmsan_check_memory(&val, sizeof(val)); @@ -269,7 +269,7 @@ void iowrite64_lo_hi(u64 val, void __iomem *addr) writeq(val, addr)); } -void iowrite64_hi_lo(u64 val, void __iomem *addr) +void __iowrite64_hi_lo(u64 val, void __iomem *addr) { /* Make sure uninitialized memory isn't copied to devices. */ kmsan_check_memory(&val, sizeof(val)); @@ -277,7 +277,7 @@ void iowrite64_hi_lo(u64 val, void __iomem *addr) writeq(val, addr)); } -void iowrite64be_lo_hi(u64 val, void __iomem *addr) +void __iowrite64be_lo_hi(u64 val, void __iomem *addr) { /* Make sure uninitialized memory isn't copied to devices. */ kmsan_check_memory(&val, sizeof(val)); @@ -285,7 +285,7 @@ void iowrite64be_lo_hi(u64 val, void __iomem *addr) mmio_write64be(val, addr)); } -void iowrite64be_hi_lo(u64 val, void __iomem *addr) +void __iowrite64be_hi_lo(u64 val, void __iomem *addr) { /* Make sure uninitialized memory isn't copied to devices. */ kmsan_check_memory(&val, sizeof(val)); @@ -293,12 +293,12 @@ void iowrite64be_hi_lo(u64 val, void __iomem *addr) mmio_write64be(val, addr)); } -EXPORT_SYMBOL(iowrite64_lo_hi); -EXPORT_SYMBOL(iowrite64_hi_lo); -EXPORT_SYMBOL(iowrite64be_lo_hi); -EXPORT_SYMBOL(iowrite64be_hi_lo); +EXPORT_SYMBOL(__iowrite64_lo_hi); +EXPORT_SYMBOL(__iowrite64_hi_lo); +EXPORT_SYMBOL(__iowrite64be_lo_hi); +EXPORT_SYMBOL(__iowrite64be_hi_lo); -#endif /* readq */ +#endif /* CONFIG_64BIT */ /* * These are the "repeat MMIO read/write" functions. |