xref: /linux/arch/arm/include/asm/smp_plat.h (revision f00ec48fadf5e37e7889f14cff900aa70d18b644)
1e616c591SRussell King /*
2e616c591SRussell King  * ARM specific SMP header, this contains our implementation
3e616c591SRussell King  * details.
4e616c591SRussell King  */
5e616c591SRussell King #ifndef __ASMARM_SMP_PLAT_H
6e616c591SRussell King #define __ASMARM_SMP_PLAT_H
7e616c591SRussell King 
8e616c591SRussell King #include <asm/cputype.h>
9e616c591SRussell King 
10e616c591SRussell King /* all SMP configurations have the extended CPUID registers */
11e616c591SRussell King static inline int tlb_ops_need_broadcast(void)
12e616c591SRussell King {
13e616c591SRussell King 	return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2;
14e616c591SRussell King }
15e616c591SRussell King 
162ef7f3dbSRussell King static inline int cache_ops_need_broadcast(void)
172ef7f3dbSRussell King {
182ef7f3dbSRussell King 	return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1;
192ef7f3dbSRussell King }
202ef7f3dbSRussell King 
21*f00ec48fSRussell King /*
22*f00ec48fSRussell King  * Return true if we are running on a SMP platform
23*f00ec48fSRussell King  */
24*f00ec48fSRussell King static inline bool is_smp(void)
25*f00ec48fSRussell King {
26*f00ec48fSRussell King #ifndef CONFIG_SMP
27*f00ec48fSRussell King 	return false;
28*f00ec48fSRussell King #elif defined(CONFIG_SMP_ON_UP)
29*f00ec48fSRussell King 	extern unsigned int smp_on_up;
30*f00ec48fSRussell King 	return !!smp_on_up;
31*f00ec48fSRussell King #else
32*f00ec48fSRussell King 	return true;
33*f00ec48fSRussell King #endif
34*f00ec48fSRussell King }
35*f00ec48fSRussell King 
36e616c591SRussell King #endif
37