diff options
Diffstat (limited to 'arch/arm/include/asm/smp_plat.h')
-rw-r--r-- | arch/arm/include/asm/smp_plat.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index a252c0bfacf5..0ad7d490ee6f 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/cpumask.h> | 8 | #include <linux/cpumask.h> |
9 | #include <linux/err.h> | 9 | #include <linux/err.h> |
10 | 10 | ||
11 | #include <asm/cpu.h> | ||
11 | #include <asm/cputype.h> | 12 | #include <asm/cputype.h> |
12 | 13 | ||
13 | /* | 14 | /* |
@@ -25,6 +26,20 @@ static inline bool is_smp(void) | |||
25 | #endif | 26 | #endif |
26 | } | 27 | } |
27 | 28 | ||
29 | /** | ||
30 | * smp_cpuid_part() - return part id for a given cpu | ||
31 | * @cpu: logical cpu id. | ||
32 | * | ||
33 | * Return: part id of logical cpu passed as argument. | ||
34 | */ | ||
35 | static inline unsigned int smp_cpuid_part(int cpu) | ||
36 | { | ||
37 | struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpu); | ||
38 | |||
39 | return is_smp() ? cpu_info->cpuid & ARM_CPU_PART_MASK : | ||
40 | read_cpuid_part(); | ||
41 | } | ||
42 | |||
28 | /* all SMP configurations have the extended CPUID registers */ | 43 | /* all SMP configurations have the extended CPUID registers */ |
29 | #ifndef CONFIG_MMU | 44 | #ifndef CONFIG_MMU |
30 | #define tlb_ops_need_broadcast() 0 | 45 | #define tlb_ops_need_broadcast() 0 |