Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw merged PR #15396: URL: https://github.com/apache/nuttx/pull/15396 -- 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.apach

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
no1wudi commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2577287954 > I guess in flat mode you could read hartid from CSR mhartid even if CONFIG_RISCV_PERCPU_SCRATCH is enabled.. Sure, let's add more detail for riscv_mhartid -- This is an

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906933501 ## arch/risc-v/Kconfig: ## @@ -461,19 +461,51 @@ config ARCH_RV_MMIO_BITS default 32 if ARCH_RV32 default 64 if ARCH_RV64 +config ARCH_RV_CPUID_MAP +

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2577275914 > BTW, the naming of the function riscv_mhartid is highly misleading. Literally, it appears to be a simple wrapper for CSR_MHARTID, but in reality, under CONFIG_RISCV_PERCPU_SCRATCH, it re

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
no1wudi commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2577260867 The naming of the function riscv_mhartid is highly misleading. Literally, it appears to be a simple wrapper for CSR_MHARTID, but in reality, under CONFIG_RISCV_PERCPU_SCRATCH, it reads th

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906913753 ## arch/risc-v/Kconfig: ## @@ -461,19 +461,51 @@ config ARCH_RV_MMIO_BITS default 32 if ARCH_RV32 default 64 if ARCH_RV64 +config ARCH_RV_CPUID_MAP +

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2577037867 > @pussuw could you give the concrete return value from up_cpud_index and up_this_cpu on your platform? I need the conversion functions as well, because in mpfs_start we need to do

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906699633 ## arch/risc-v/src/common/riscv_internal.h: ## @@ -356,40 +356,24 @@ void riscv_cpu_boot(int cpu); int riscv_smp_call_handler(int irq, void *c, void *arg); #endif +#

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906703964 ## arch/risc-v/src/common/riscv_internal.h: ## @@ -356,40 +356,24 @@ void riscv_cpu_boot(int cpu); int riscv_smp_call_handler(int irq, void *c, void *arg); #endif +#

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906714804 ## arch/risc-v/Kconfig: ## @@ -461,19 +461,50 @@ config ARCH_RV_MMIO_BITS default 32 if ARCH_RV32 default 64 if ARCH_RV64 +config ARCH_RV_CPUID_MAP +

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906705437 ## arch/risc-v/src/common/riscv_cpuindex.c: ## @@ -38,32 +36,30 @@ / /**

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906703964 ## arch/risc-v/src/common/riscv_internal.h: ## @@ -356,40 +356,24 @@ void riscv_cpu_boot(int cpu); int riscv_smp_call_handler(int irq, void *c, void *arg); #endif +#

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906699633 ## arch/risc-v/src/common/riscv_internal.h: ## @@ -356,40 +356,24 @@ void riscv_cpu_boot(int cpu); int riscv_smp_call_handler(int irq, void *c, void *arg); #endif +#

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-08 Thread via GitHub
pussuw commented on code in PR #15396: URL: https://github.com/apache/nuttx/pull/15396#discussion_r1906698598 ## arch/risc-v/src/common/riscv_macros.S: ## @@ -359,7 +359,7 @@ / .macro riscv_mhartid

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-07 Thread via GitHub
xiaoxiang781216 commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2576933521 @pussuw could you give the concrete return value from up_cpud_index and up_this_cpu on your platform? -- This is an automated message from the Apache Git Service. To respond to

Re: [PR] arch/risc-v: Make CPU index handling based on ARCH_RV_CPUID_MAP [nuttx]

2025-01-07 Thread via GitHub
no1wudi commented on PR #15396: URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2576607806 > That would make sense, since the problem here really is that we don't have a dedicated flag for enabling CPUID mapping. Now a new option `ARCH_RV_CPUID_MAP` is used for CPUID