yf13 commented on code in PR #11379:
URL: https://github.com/apache/nuttx/pull/11379#discussion_r1427483175


##########
arch/risc-v/src/common/riscv_mtimer.c:
##########
@@ -83,7 +83,7 @@ static const struct oneshot_operations_s g_riscv_mtimer_ops =
 #ifndef CONFIG_ARCH_USE_S_MODE
 static uint64_t riscv_mtimer_get_mtime(struct riscv_mtimer_lowerhalf_s *priv)
 {
-#ifdef CONFIG_ARCH_RV64
+#if defined(CONFIG_ARCH_RV64) && !defined(CONFIG_ARCH_CHIP_K230)

Review Comment:
   @xiaoxiang781216
   
   if you are sure that non-RISCV architectures won't have this different MMIO 
width issue, I am fine to contain the issue within RISCV scope for now. 
Otherwise later you will see that ARCH_MMIO_NO_64BIT is more proper.  
   
   On the other side I am concerned with this NO_64BIT style design as when 128 
bit RiscV chip arrives later you will need add MMIO_NO_128BIT.  
   
   Maybe we can consider explicit options like::
   
   - two booleans like `ARCH_RV_MMIO_64BIT` and `ARCH_RV_MMIO_32BIT`?
   - one enum like `ARCH_RV_MMIO_BITS`?
   



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