]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Detect the presence of big-cores via "ibm, thread-groups"
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>
Thu, 11 Oct 2018 05:33:01 +0000 (11:03 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 13 Oct 2018 11:21:25 +0000 (22:21 +1100)
commit27af959ed9af4d5a51460aba7e7e8a8ba94eaeff
tree9257d91dd485476e4feeeaaa71dba4c54317fde0
parent952faf17eed22439d5be02cf23daea1beccbc058
powerpc: Detect the presence of big-cores via "ibm, thread-groups"

On IBM POWER9, the device tree exposes a property array identifed by
"ibm,thread-groups" which will indicate which groups of threads share
a particular set of resources.

As of today we only have one form of grouping identifying the group of
threads in the core that share the L1 cache, translation cache and
instruction data flow.

This patch adds helper functions to parse the contents of
"ibm,thread-groups" and populate a per-cpu variable to cache
information about siblings of each CPU that share the L1, traslation
cache and instruction data-flow.

It also defines a new global variable named "has_big_cores" which
indicates if the cores on this configuration have multiple groups of
threads that share L1 cache.

For each online CPU, it maintains a cpu_smallcore_mask, which
indicates the online siblings which share the L1-cache with it.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/cputhreads.h
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/smp.c