lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114125111.599093-13-mpe@ellerman.id.au>
Date: Thu, 14 Nov 2024 23:51:02 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: <linuxppc-dev@...ts.ozlabs.org>
Cc: <linux-kernel@...r.kernel.org>,
	<jk@...abs.org>,
	<arnd@...db.de>,
	<geoff@...radead.org>
Subject: [RFC PATCH 13/20] powerpc/io: Remove unnecessary indirection

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@...erman.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ