diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2012-09-10 16:06:30 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-07-17 11:12:03 +0100 |
commit | 366001345f62d151aa95499fa4ed49f7d952b253 (patch) | |
tree | 121bc21f3a0640ea9c6e76749efd70e3a25cfadf /arch/arm/include/asm | |
parent | 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff) |
ARM: kernel: provide cluster to logical cpu mask mapping API
Some device drivers like PMU require to retrieve the logical cpu mask
that corresponds to a given cluster id. This patch provides a hook in
the topology code that, given an existing cluster id as input,
initializes the corresponding cpumask passed as a pointer, reusing all
existing topology information required by sched domains in the kernel.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/topology.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index 58b8b84adcd..611edefaeaf 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h @@ -26,11 +26,14 @@ extern struct cputopo_arm cpu_topology[NR_CPUS]; void init_cpu_topology(void); void store_cpu_topology(unsigned int cpuid); const struct cpumask *cpu_coregroup_mask(int cpu); +int cluster_to_logical_mask(unsigned int socket_id, cpumask_t *cluster_mask); #else static inline void init_cpu_topology(void) { } static inline void store_cpu_topology(unsigned int cpuid) { } +static inline int cluster_to_logical_mask(unsigned int socket_id, + cpumask_t *cluster_mask) { return -EINVAL; } #endif |