diff options
Diffstat (limited to 'arch/arm/common/mcpm_platsmp.c')
-rw-r--r-- | arch/arm/common/mcpm_platsmp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c index 1bc34c7567fd..c0c3cd799ccc 100644 --- a/arch/arm/common/mcpm_platsmp.c +++ b/arch/arm/common/mcpm_platsmp.c | |||
@@ -19,14 +19,23 @@ | |||
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | #include <asm/smp_plat.h> | 20 | #include <asm/smp_plat.h> |
21 | 21 | ||
22 | static void cpu_to_pcpu(unsigned int cpu, | ||
23 | unsigned int *pcpu, unsigned int *pcluster) | ||
24 | { | ||
25 | unsigned int mpidr; | ||
26 | |||
27 | mpidr = cpu_logical_map(cpu); | ||
28 | *pcpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | ||
29 | *pcluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
30 | } | ||
31 | |||
22 | static int mcpm_boot_secondary(unsigned int cpu, struct task_struct *idle) | 32 | static int mcpm_boot_secondary(unsigned int cpu, struct task_struct *idle) |
23 | { | 33 | { |
24 | unsigned int mpidr, pcpu, pcluster, ret; | 34 | unsigned int pcpu, pcluster, ret; |
25 | extern void secondary_startup(void); | 35 | extern void secondary_startup(void); |
26 | 36 | ||
27 | mpidr = cpu_logical_map(cpu); | 37 | cpu_to_pcpu(cpu, &pcpu, &pcluster); |
28 | pcpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); | 38 | |
29 | pcluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); | ||
30 | pr_debug("%s: logical CPU %d is physical CPU %d cluster %d\n", | 39 | pr_debug("%s: logical CPU %d is physical CPU %d cluster %d\n", |
31 | __func__, cpu, pcpu, pcluster); | 40 | __func__, cpu, pcpu, pcluster); |
32 | 41 | ||