[RFC PATCH 13/20] powerpc/io: Remove unnecessary indirection
Michael Ellerman
mpe at ellerman.id.au
Thu Nov 14 23:51:02 AEDT 2024
Some of the __do_xxx() defines do nothing useful, they just existed to
make the previous hooking macros work. So remove them.
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
arch/powerpc/include/asm/io.h | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index faf868715eb5..fd7fe78be86f 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -505,13 +505,6 @@ __do_out_asm(_rec_outl, "stwbrx")
* possible to hook directly at the toplevel PIO operation if they have to
* be handled differently
*/
-#define __do_writeb(val, addr) out_8(addr, val)
-#define __do_writew(val, addr) out_le16(addr, val)
-#define __do_writel(val, addr) out_le32(addr, val)
-#define __do_writeq(val, addr) out_le64(addr, val)
-#define __do_writew_be(val, addr) out_be16(addr, val)
-#define __do_writel_be(val, addr) out_be32(addr, val)
-#define __do_writeq_be(val, addr) out_be64(addr, val)
#ifdef CONFIG_EEH
#define __do_readb(addr) eeh_readb(addr)
@@ -607,27 +600,27 @@ static inline u32 readl_be(const PCI_IO_ADDR addr)
static inline void writeb(u8 val, PCI_IO_ADDR addr)
{
- __do_writeb(val, addr);
+ out_8(addr, val);
}
static inline void writew(u16 val, PCI_IO_ADDR addr)
{
- __do_writew(val, addr);
+ out_le16(addr, val);
}
static inline void writel(u32 val, PCI_IO_ADDR addr)
{
- __do_writel(val, addr);
+ out_le32(addr, val);
}
static inline void writew_be(u16 val, PCI_IO_ADDR addr)
{
- __do_writew_be(val, addr);
+ out_be16(addr, val);
}
static inline void writel_be(u32 val, PCI_IO_ADDR addr)
{
- __do_writel_be(val, addr);
+ out_be32(addr, val);
}
static inline void readsb(const PCI_IO_ADDR a, void *b, unsigned long c)
@@ -688,12 +681,12 @@ static inline u64 readq_be(const PCI_IO_ADDR addr)
static inline void writeq(u64 val, PCI_IO_ADDR addr)
{
- __do_writeq(val, addr);
+ out_le64(addr, val);
}
static inline void writeq_be(u64 val, PCI_IO_ADDR addr)
{
- __do_writeq_be(val, addr);
+ out_be64(addr, val);
}
#endif /* __powerpc64__ */
--
2.47.0
More information about the Linuxppc-dev
mailing list