Date: Fri, 31 Jan 2020 17:49:15 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357337 - head/sys/riscv/include Message-ID: <202001311749.00VHnFb7090545@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jan 31 17:49:15 2020 New Revision: 357337 URL: https://svnweb.freebsd.org/changeset/base/357337 Log: Fix 64-bit value of SSTATUS_SD to use an unsigned long. While here, fix MSTATUS_SD to match SSTATUS_SD. Reviewed by: mhorne MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23434 Modified: head/sys/riscv/include/riscvreg.h Modified: head/sys/riscv/include/riscvreg.h ============================================================================== --- head/sys/riscv/include/riscvreg.h Fri Jan 31 17:40:41 2020 (r357336) +++ head/sys/riscv/include/riscvreg.h Fri Jan 31 17:49:15 2020 (r357337) @@ -73,7 +73,7 @@ #define SSTATUS_XS_MASK (0x3 << SSTATUS_XS_SHIFT) #define SSTATUS_SUM (1 << 18) #if __riscv_xlen == 64 -#define SSTATUS_SD (1 << 63) +#define SSTATUS_SD (1ul << 63) #else #define SSTATUS_SD (1 << 31) #endif @@ -110,8 +110,11 @@ #define MSTATUS_VM_SV48 10 #define MSTATUS_VM_SV57 11 #define MSTATUS_VM_SV64 12 -#define MSTATUS32_SD (1 << 63) -#define MSTATUS64_SD (1 << 31) +#if __riscv_xlen == 64 +#define MSTATUS_SD (1ul << 63) +#else +#define MSTATUS_SD (1 << 31) +#endif #define MSTATUS_PRV_U 0 /* user */ #define MSTATUS_PRV_S 1 /* supervisor */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001311749.00VHnFb7090545>