arm64: topology: add MPIDR-based detection
PATCH RESEND 1/1 arm64: topology: add MPIDR-based detection
Lorenzo and Mark agreed on the following updated patch from Lorenzo:
http://www.spinics.net/lists/arm-kernel/msg336998.html
W.r.t. cluster numbering, we're now back to where we were with the the original patch sent out in April:
https://lkml.org/lkml/2014/4/22/951
Were there any other objections to this approach?
AFAICT, this patch should be good to go for 3.16.
------->8--------
Create cpu topology based on MPIDR. When hardware sets MPIDR to sane values, this method will always work. Therefore it should also work well as the fallback method. [1]
When we have multiple processing elements in the system, we create the cpu topology by mapping each affinity level (from lowest to highest) to threads (if they exist), cores, and clusters.
[1] http://www.spinics.net/lists/arm-kernel/msg317445.html
--- arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/topology.c | 47 ++++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 14 deletions(-)
arch/arm64/include/asm/cputype.h +2 -0
@@ -18,6 +18,8 @@#define INVALID_HWID ULONG_MAX +#define MPIDR_UP_BITMASK (0x1 << 30) +#define MPIDR_MT_BITMASK (0x1 << 24)#define MPIDR_HWID_BITMASK 0xff00ffffff#define MPIDR_LEVEL_BITS_SHIFT 3
arch/arm64/kernel/topology.c +33 -14
72 lines not on this page · raw message
Signature · 1 line
1.8.4
Catalin Marinas
maintainerPATCH RESEND 1/1 arm64: topology: add MPIDR-based detection
Quoted 21 lines · Zi Shen Lim
Lorenzo and Mark agreed on the following updated patch from Lorenzo:
http://www.spinics.net/lists/arm-kernel/msg336998.htmlW.r.t. cluster numbering, we're now back to where we were with the the original patch sent out in April:
https://lkml.org/lkml/2014/4/22/951Were there any other objections to this approach?
AFAICT, this patch should be good to go for 3.16.
------->8--------Create cpu topology based on MPIDR. When hardware sets MPIDR to sane values, this method will always work. Therefore it should also work well as the fallback method. [1]
When we have multiple processing elements in the system, we create the cpu topology by mapping each affinity level (from lowest to highest) to threads (if they exist), cores, and clusters.
Quoted 7 lines
Signed-off-by Zi Shen Lim <[email protected]>Signed-off-by Mark Brown <[email protected]>--- arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/topology.c | 47 ++++++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 14 deletions(-)
Applied for 3.17. Thanks.
Signature · 1 line
Catalin