pkarashchenko commented on a change in pull request #5775:
URL: https://github.com/apache/incubator-nuttx/pull/5775#discussion_r830386543



##########
File path: arch/risc-v/include/csr.h
##########
@@ -307,6 +307,14 @@
 #define MSTATUS_FS_CLEAN  (0x2 << 13)
 #define MSTATUS_FS_DIRTY  (0x3 << 13)
 
+/* Mask of preserved bits for mstatus */
+
+#ifdef CONFIG_ARCH_RV32
+#define MSTATUS_WPRI      (0xff << 23 | 0x15)
+#else
+#define MSTATUS_WPRI      (0x1fffffful << 38 | 0x1fful << 23 | 0x15ul) 

Review comment:
       ```suggestion
   #define MSTATUS_WPRI      (0x1ffffffllu << 38 | 0x1ffllu << 23 | 0x15) 
   ```
   or we can go with
   ```suggestion
   #define MSTATUS_WPRI      (UINT64_C(0x1ffffff) << 38 | UINT64_C(0x1ff) << 23 
| 0x15) 
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to