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
This commit is contained in:
John Baldwin
2020-01-31 17:49:15 +00:00
parent 43524989c5
commit cca117a17b
+6 -3
View File
@@ -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 */