diff mbox series

[RFC,04/15] riscv: word-at-atime: move to generic if we're big endian

Message ID 20241220155801.1988785-5-ben.dooks@codethink.co.uk (mailing list archive)
State New
Headers show
Series [RFC,01/15] riscv: add initial kconfig and build flags for big-endian | expand

Checks

Context Check Description
conchuod/vmtest-fixes-PR fail merge-conflict

Commit Message

Ben Dooks Dec. 20, 2024, 3:57 p.m. UTC
Use the generic word at a time code if we're running in big endian
for now otherwise this doesn't work. Add better support later.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 arch/riscv/include/asm/word-at-a-time.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/riscv/include/asm/word-at-a-time.h b/arch/riscv/include/asm/word-at-a-time.h
index 3802cda71ab7..436e3588f50f 100644
--- a/arch/riscv/include/asm/word-at-a-time.h
+++ b/arch/riscv/include/asm/word-at-a-time.h
@@ -8,8 +8,9 @@ 
 #ifndef _ASM_RISCV_WORD_AT_A_TIME_H
 #define _ASM_RISCV_WORD_AT_A_TIME_H
 
-
 #include <asm/asm-extable.h>
+
+#ifndef __RISCVEB__
 #include <linux/bitops.h>
 #include <linux/wordpart.h>
 
@@ -47,6 +48,14 @@  static inline unsigned long find_zero(unsigned long mask)
 /* The mask we created is directly usable as a bytemask */
 #define zero_bytemask(mask) (mask)
 
+#else /* !__RISCVEB__ */
+
+/* use the generic one for now */
+#include <asm-generic/word-at-a-time.h>
+#endif /* !__RISCVEB__ */
+
+
+
 #ifdef CONFIG_DCACHE_WORD_ACCESS
 
 /*