You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/08 17:16:36 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2822: arch/riscv: Unify 32/64 implementations and remove dead ports

xiaoxiang781216 commented on a change in pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#discussion_r572217171



##########
File path: arch/risc-v/include/arch.h
##########
@@ -42,70 +30,47 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-
-#ifndef __ASSEMBLY__
-#  include <stdint.h>
-#endif
-
 #include <arch/csr.h>
 
-#ifdef CONFIG_ARCH_RV32IM
-#  include <arch/rv32im/arch.h>
-#endif
-
-#ifdef CONFIG_ARCH_RV64GC
-#  include <arch/rv64gc/arch.h>
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* Macros to get the core and vendor ID, HART, arch and ISA codes, etc.
- */
-
-#ifdef CONFIG_RV32IM_SYSTEM_CSRRS_SUPPORT
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
 
-uint32_t up_getmisa(void);
-uint32_t up_getarchid(void);
-uint32_t up_getimpid(void);
-uint32_t up_getvendorid(void);
-uint32_t up_gethartid(void);
+#ifndef __ASSEMBLY__
 
+#ifdef __LP64__
+typedef uint64_t reg_t;

Review comment:
       uintptr_t looks fine at least for riscv_getsp

##########
File path: arch/risc-v/include/arch.h
##########
@@ -1,32 +1,20 @@
 /****************************************************************************
  * arch/risc-v/include/arch.h
  *
- *   Copyright (C) 2016 Ken Pettit. All rights reserved.

Review comment:
       it's better to move the copyright change to another PR to simplify the review.

##########
File path: Documentation/introduction/detailed_support.rst
##########
@@ -3020,25 +3020,6 @@ RISC-V
 RISC-V Architectural Support. Basic support for the RISC-V architecture
 was contributed by Ken Pettit in NuttX-7.19.
 
-NEXT RISC-V NR5Mxx

Review comment:
       it will make the review more simple if we create a new PR for removing the old chip.




----------------------------------------------------------------
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.

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