Skip to contentSkip to conversation

fix prototypes of reads[bwl]() on sparc64

PATCH In review Al Viro 2 participants 3 messages Aug 10, 2025 – Sep 19, 2025

Subsystems (2)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 fix prototypes of reads[bwl]() on sparc64

Conventions for readsl() are the same as for readl() - any __iomem pointer is acceptable, both const and volatile ones being OK. Same for readsb() and readsw().

---

arch/sparc/include/asm/io_64.h +3 -3
index c9528e4719cd..d8ed296624af 100644
@@ -250,19 +250,19 @@ void insl(unsigned long, void *, unsigned long);
 #define insw insw
 #define insl insl
 
-static inline void readsb(void __iomem *port, void *buf, unsigned long count)
+static inline void readsb(const volatile 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)
+static inline void readsw(const volatile 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)
+static inline void readsl(const volatile void __iomem *port, void *buf, unsigned long count)
 {
 	insl((unsigned long __force)port, buf, count);
 }
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 23 lines · Al Viro

Conventions for readsl() are the same as for readl() - any __iomem pointer is acceptable, both const and volatile ones being OK. Same for readsb() and readsw().

---

arch/sparc/include/asm/io_64.h +2 -2
index c9528e4719cd..d8ed296624af 100644
@@ -250,19 +250,19 @@ void insl(unsigned long, void *, unsigned long);
 #define insw insw
 #define insl insl
 
-static inline void readsb(void __iomem *port, void *buf, unsigned long count)
+static inline void readsb(const volatile 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)
+static inline void readsw(const volatile void __iomem *port, void *buf, unsigned long count)

arch/sparc/include/asm/io_64.h void insl(unsigned long, void *, unsigned long); · line 268

Quoted 10 lines
arch/sparc/include/asm/io_64.h +1 -1
 {
 	insw((unsigned long __force)port, buf, count);
 }
 #define readsw readsw
 
-static inline void readsl(void __iomem *port, void *buf, unsigned long count)
+static inline void readsl(const volatile void __iomem *port, void *buf, unsigned long count)
 {
 	insl((unsigned long __force)port, buf, count);
 }

Picking this up to my for-next.

Thanks,
Andreas

maintainer
#2 lore raw
Quoted 1 line · Andreas Larsson

Picking this up to my for-next.

...and swapping sparc64 to subject be prefix:

sparc64: fix prototypes of reads[bwl]()

Cheers,
Andreas