Russell King | e616c59 | 2009-09-27 20:55:43 +0100 | [diff] [blame] | 1 | /* |
| 2 | * ARM specific SMP header, this contains our implementation |
| 3 | * details. |
| 4 | */ |
| 5 | #ifndef __ASMARM_SMP_PLAT_H |
| 6 | #define __ASMARM_SMP_PLAT_H |
| 7 | |
| 8 | #include <asm/cputype.h> |
| 9 | |
| 10 | /* all SMP configurations have the extended CPUID registers */ |
| 11 | static inline int tlb_ops_need_broadcast(void) |
| 12 | { |
| 13 | return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2; |
| 14 | } |
| 15 | |
Russell King | 2ef7f3d | 2009-11-05 13:29:36 +0000 | [diff] [blame] | 16 | static inline int cache_ops_need_broadcast(void) |
| 17 | { |
| 18 | return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1; |
| 19 | } |
| 20 | |
Russell King | f00ec48 | 2010-09-04 10:47:48 +0100 | [diff] [blame^] | 21 | /* |
| 22 | * Return true if we are running on a SMP platform |
| 23 | */ |
| 24 | static inline bool is_smp(void) |
| 25 | { |
| 26 | #ifndef CONFIG_SMP |
| 27 | return false; |
| 28 | #elif defined(CONFIG_SMP_ON_UP) |
| 29 | extern unsigned int smp_on_up; |
| 30 | return !!smp_on_up; |
| 31 | #else |
| 32 | return true; |
| 33 | #endif |
| 34 | } |
| 35 | |
Russell King | e616c59 | 2009-09-27 20:55:43 +0100 | [diff] [blame] | 36 | #endif |