From 93c9130a67c1e3d76d0c4fa2e6c9e2a2ee51a2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sun, 8 Apr 2018 15:05:08 +0200 Subject: arch/riscv: Store mprv bit in size_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CSRs are XLEN bits wide (i.e. the same width as general purpose registers), so size_t seems a little more correct than int. This change doesn't affect functionality because MSTATUS_MPRV already fits in 31 bits. Change-Id: I003c1b88b4493681dc9b6178ac785be330203ef5 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/25625 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/riscv/include/vm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/arch/riscv/include/vm.h b/src/arch/riscv/include/vm.h index fd0a2c947c..a30d6bbdd5 100644 --- a/src/arch/riscv/include/vm.h +++ b/src/arch/riscv/include/vm.h @@ -42,7 +42,7 @@ void mstatus_init(void); // need to setup mstatus so we know we have virtual mem static inline type name(type *p); \ static inline type name(type *p) \ { \ - int mprv = MSTATUS_MPRV; \ + size_t mprv = MSTATUS_MPRV; \ type value; \ asm ( \ "csrs mstatus, %1\n" \ @@ -57,7 +57,7 @@ void mstatus_init(void); // need to setup mstatus so we know we have virtual mem static inline void name(type *p, type value); \ static inline void name(type *p, type value) \ { \ - int mprv = MSTATUS_MPRV; \ + size_t mprv = MSTATUS_MPRV; \ asm ( \ "csrs mstatus, %0\n" \ STRINGIFY(insn) " %1, 0(%2)\n" \ -- cgit v1.2.3