pussuw commented on PR #15396:
URL: https://github.com/apache/nuttx/pull/15396#issuecomment-2574565628

   > > I use an overloaded version (defined by board logic) of hartid<->cpuid 
mapping in my downstream project. This was the whole point to define those as 
weak symbols. Please do not break this functionality.
   > 
   > Another point to note is that in this PR, CONFIG_ARCH_RV_HARTID_BASE is 
used to select the implementation of up_cpu_index. Please confirm if this 
aligns with your requirements.
   > 
   > ```c
   > #ifdef CONFIG_ARCH_HAVE_MULTICPU
   > #if CONFIG_ARCH_RV_HARTID_BASE != 0
   > int up_cpu_index(void) noinstrument_function;
   > #else
   > noinstrument_function static inline int up_cpu_index(void)
   > {
   >   return READ_CSR(CSR_MHARTID);
   > }
   > #endif /* CONFIG_ARCH_RV_HARTID_BASE */
   > #endif /* CONFIG_ARCH_HAVE_MULTICPU */
   > ```
   
   Sorry for delayed reply, but yes this will also not work for me. 
CONFIG_ARCH_RV_HARTID_BASE is too limited for me, as it only allows offset 
based CPUID mapping. I need to map the cores dynamically as I have AMP in my 
target as well as SMP. Also the previous patch 
https://github.com/apache/nuttx/commit/6eb2f3327837238f8922045bf00ba3f6340fd701 
breaks up_cpu_index() for me :(


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