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

Ben Dooks ben.dooks at codethink.co.uk
Fri Dec 20 07:57:50 PST 2024


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 at codethink.co.uk>
---
 arch/riscv/include/asm/word-at-a-time.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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
 
 /*
-- 
2.37.2.352.g3c44437643




More information about the linux-riscv mailing list