pussuw commented on PR #13886: URL: https://github.com/apache/nuttx/pull/13886#issuecomment-2407253070
A logical CPU index just an arbitrary number and its value is only meaningful for the operating system code, while the physical CPU index can have meaning in things like interrupt acknowledgement etc. They most definitely do not have to be the same, even though in our case they are, at least atm. The issue arises when we introduce a platform, that has CPU cores with unequal capabilities e.g. MPFS / Polarfire SoC. It has harts 0..4 but hart0 cannot participate in NuttX SMP as it is less capable than harts 1..4, it does not have an MMU for one example. On the other hand, for interrupt acknowledgment the physical core (hartID) is needed. This is why some kind of logical <-> physical conversion (other than physical=logical) is inevitably needed. I think Linux handles this via FDT, but we can do with something much simpler. My question was simply to ask if you were already implementing something for this_cpu(). If not, then I'll do the simple translation that fixes MPFS SMP. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
