Record MPIDR for all started cores to table and use this table as link
between arbitrarily assigned cpuid and real system position of given core.
MFC after: 1 month
Differential D13863
Simplify and cleanup startup code for secondary cores. mmel on Jan 11 2018, 3:44 PM. Authored by Tags None Referenced Files
Details Record MPIDR for all started cores to table and use this table as link MFC after: 1 month
Diff Detail
Event TimelineComment Actions Will this still work on the Juno where the boot cpu is not the first CPU in the dtb?
Comment Actions Boot CPU have always cpuid 0 so yes, it boots (i hope). I have disordered cpus nodes in my DTS and all looks OK.
Comment Actions Update to the final version. r359280 removed the need to access the cpu_mpidr table from the assembler. So eliminate it and insert the mpidr field into the pcpu structure as originally requested. Comment Actions Will this reorder the CPU IDs? One reason for the previous scheme because at least one Arm CPU has 4 little CPUs and 2 big. As it booted on the first big this would be CPU 4 in the DTB. By rotating we can keep the big CPUs together. My preference would be to allow booting from pcpu[4], but haven't had the time to audit the code to check it doesn't hard code the boot CPU is 0. Comment Actions Yes, it changes CPU IDs. (For FDT case only. I assume that ACPI must always start on CPU0, even if I didn't find it in standard).
By all this, I think that we should take CPU ID as arbitrary value, without any relationship to physical topology and topology itself should be presented by cpu_topo().And other consumers (like GIC, scheduler, NUMA...) should build its own cpu_sets for given functionality. I don't see possibility how to represent all this by single number. |