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 10:04:58 UTC

[GitHub] [incubator-nuttx] btashton opened a new pull request #2822: arch/riscv: Unify 32/64 implementations and remove dead ports

btashton opened a new pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822


   ## Summary
   Unify the 32 and 64 bit RISC-V arch and as part of this also drop:
    * nr5m100 -- Non-public custom implementation
    * gap8 -- Custom non-standard RISC-V architecture. 
   
   ## Impact
   
   ## Testing
   Not ready for merge!
   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 closed pull request #2822: arch/riscv: Unify 32/64 implementations and remove dead ports

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822


   


-- 
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-unsubscribe@nuttx.apache.org

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



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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#issuecomment-1009767151


   Let's track the merge in https://github.com/apache/incubator-nuttx/pull/2822 instead.


-- 
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-unsubscribe@nuttx.apache.org

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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#discussion_r571919479



##########
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:
       @xiaoxiang781216 How do you think we should approach this?  I would prefer to use something like uintptr_t, but that does not feel quite right either.




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



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

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#discussion_r572242438



##########
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:
       I just used the one from rv64 which was Apache but this file I am replacing is BSD which is why it looks like I license change. 




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



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

Posted by GitBox <gi...@apache.org>.
btashton commented on a change in pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#discussion_r572240708



##########
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:
       The nr5m100 stuff was tangled in with the rv32 so it was cleaner to just remove it at the same time then have to stub stuff out for 64 and go back and remove it. 




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



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

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2822:
URL: https://github.com/apache/incubator-nuttx/pull/2822#issuecomment-1003589704


   Will be done step by step:
   https://github.com/apache/incubator-nuttx/pull/5076
   https://github.com/apache/incubator-nuttx/pull/5092
   https://github.com/apache/incubator-nuttx/pull/5097
   https://github.com/apache/incubator-nuttx/pull/5103
   https://github.com/apache/incubator-nuttx/pull/5106
   https://github.com/apache/incubator-nuttx/pull/5115
   https://github.com/apache/incubator-nuttx/pull/5123
   https://github.com/apache/incubator-nuttx/pull/5135


-- 
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-unsubscribe@nuttx.apache.org

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