pussuw commented on pull request #5782:
URL: https://github.com/apache/incubator-nuttx/pull/5782#issuecomment-1081782547


   @xiaoxiang781216 This patch is getting so massive that I propose I remove 
the SBI part again so we can get the other parts merged.
   
   What I propose is:
   - Remove the SBI implementation and try to make handling of the timer as is 
per the RISC-V SBI spec. If this fails we can always use what I have now
   - Remove the wrapper functions, and introduce them in the next patch
   ```
   /* RISC-V SBI wrappers 
******************************************************/
   
   #ifdef CONFIG_ARCH_USE_S_MODE
   void riscv_sbi_ack_timer(void);
   uintptr_t riscv_sbi_mhartid(void);
   #endif
   ```
   - Leave a warning about missing functionality into:
   ```
   uintptr_t riscv_mhartid(void)
   {
   #ifdef CONFIG_ARCH_USE_S_MODE
     /* Kernel is in S-mode */
   
   #error "Missing functionality"
   
   #else
     /* Kernel is in M-mode */
   
     return READ_CSR(mhartid);
   #endif
   }
   ```


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