summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/cputhreads.h
diff options
context:
space:
mode:
authorGautham R. Shenoy <ego@linux.vnet.ibm.com>2018-10-11 11:03:01 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-13 22:21:25 +1100
commit425752c63b6f3fed7b5a9cba2b8101a92cf36995 (patch)
tree9257d91dd485476e4feeeaaa71dba4c54317fde0 /arch/powerpc/include/asm/cputhreads.h
parentbf6cbd0c87f30d0e4401be91a8161ce11079027a (diff)
downloadlinux-425752c63b6f3fed7b5a9cba2b8101a92cf36995.tar.bz2
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>
Diffstat (limited to 'arch/powerpc/include/asm/cputhreads.h')
-rw-r--r--arch/powerpc/include/asm/cputhreads.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/cputhreads.h b/arch/powerpc/include/asm/cputhreads.h
index d71a90924f3b..deb99fd6e060 100644
--- a/arch/powerpc/include/asm/cputhreads.h
+++ b/arch/powerpc/include/asm/cputhreads.h
@@ -23,11 +23,13 @@
extern int threads_per_core;
extern int threads_per_subcore;
extern int threads_shift;
+extern bool has_big_cores;
extern cpumask_t threads_core_mask;
#else
#define threads_per_core 1
#define threads_per_subcore 1
#define threads_shift 0
+#define has_big_cores 0
#define threads_core_mask (*get_cpu_mask(0))
#endif