diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-08-08 01:30:45 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-12 08:59:51 +0200 |
commit | 384ff14253cc9c6be35deb18bca750d35101258e (patch) | |
tree | 7d52963d4adeb0469d711778b18371717033d408 /arch/riscv | |
parent | 21e5652f989d2df9a1722698b2d5f9257c6c4c3b (diff) | |
download | barebox-384ff14253cc9c6be35deb18bca750d35101258e.tar.gz barebox-384ff14253cc9c6be35deb18bca750d35101258e.tar.xz |
riscv: use generic bitsperlong.h
Linux highly depends on the fact that the 'long' and the pointer
have the same width, and so does barebox.
So, we can always use include/asm-generic/bitsperlong.h, which
determines BITS_PER_LONG depending on CONFIG_64BIT.
This is what Linux does (at least in the kernel-space), and barebox
can follow it.
Currently, barebox only supports 32-bit riscv, but this should work
when it supports 64-bit by adding CONFIG_64BIT to arch/riscv/Kconfig.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/include/asm/bitsperlong.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/riscv/include/asm/bitsperlong.h b/arch/riscv/include/asm/bitsperlong.h index 4641e7e485..6dc0bb0c13 100644 --- a/arch/riscv/include/asm/bitsperlong.h +++ b/arch/riscv/include/asm/bitsperlong.h @@ -1,10 +1 @@ -#ifndef __ASM_BITSPERLONG_H -#define __ASM_BITSPERLONG_H - -#ifdef __riscv64 -#define BITS_PER_LONG 64 -#else -#define BITS_PER_LONG 32 -#endif - -#endif /* __ASM_BITSPERLONG_H */ +#include <asm-generic/bitsperlong.h> |