Skip to content

Commit b07ce24

Browse files
committed
alpha: fix ioread64be()/iowrite64be() helpers
Compile-testing the crypto/caam driver on alpha showed a pre-existing problem on alpha with iowrite64be() missing: ERROR: modpost: "iowrite64be" [drivers/crypto/caam/caam_jr.ko] undefined! The prototypes were added a while ago when we started using asm-generic/io.h, but the implementation was still missing. At some point the ioread64/iowrite64 helpers were added, but the big-endian versions are still missing, and the generic version (using readq/writeq) is would not work here. Change it to wrap ioread64()/iowrite64() instead. Fixes: beba377 ("crypto: caam: Make CRYPTO_DEV_FSL_CAAM dependent of COMPILE_TEST") Fixes: e19d4eb ("alpha: add full ioread64/iowrite64 implementation") Fixes: 7e772da ("alpha: Use generic <asm-generic/io.h>") Closes: https://lore.kernel.org/all/CAHk-=wgEyzSxTs467NDOVfBSzWvUS6ztcwhiy=M3xog==KBmTw@mail.gmail.com/ Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 8400291 commit b07ce24

File tree

1 file changed

+2
-2
lines changed
  • arch/alpha/include/asm

1 file changed

+2
-2
lines changed

arch/alpha/include/asm/io.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,10 @@ extern inline void writeq(u64 b, volatile void __iomem *addr)
534534

535535
#define ioread16be(p) swab16(ioread16(p))
536536
#define ioread32be(p) swab32(ioread32(p))
537+
#define ioread64be(p) swab64(ioread64(p))
537538
#define iowrite16be(v,p) iowrite16(swab16(v), (p))
538539
#define iowrite32be(v,p) iowrite32(swab32(v), (p))
540+
#define iowrite64be(v,p) iowrite64(swab64(v), (p))
539541

540542
#define inb_p inb
541543
#define inw_p inw
@@ -634,8 +636,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
634636
*/
635637
#define ioread64 ioread64
636638
#define iowrite64 iowrite64
637-
#define ioread64be ioread64be
638-
#define iowrite64be iowrite64be
639639
#define ioread8_rep ioread8_rep
640640
#define ioread16_rep ioread16_rep
641641
#define ioread32_rep ioread32_rep

0 commit comments

Comments
 (0)