Merge tag 'riscv-for-linus-5.19-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / riscv / include / asm / csr.h
index cc40521e438b32147767393fc9b96eed0610a754..6d85655e7edf26aabfe4b8345a3d95851fd8a87b 100644 (file)
 #define SR_SD          _AC(0x8000000000000000, UL) /* FS/XS dirty */
 #endif
 
+#ifdef CONFIG_64BIT
+#define SR_UXL         _AC(0x300000000, UL) /* XLEN mask for U-mode */
+#define SR_UXL_32      _AC(0x100000000, UL) /* XLEN = 32 for U-mode */
+#define SR_UXL_64      _AC(0x200000000, UL) /* XLEN = 64 for U-mode */
+#define SR_UXL_SHIFT   32
+#endif
+
 /* SATP flags */
 #ifndef CONFIG_64BIT
 #define SATP_PPN       _AC(0x003FFFFF, UL)