diff options
author | Gary King <gking@nvidia.com> | 2009-12-07 16:41:53 -0800 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2009-12-07 16:43:25 -0800 |
commit | edbde716d325671d85e237edb3f951547fcd558f (patch) | |
tree | f0d1de94df36c6a4fb93667e5f52d70ea78086bd /arch/arm/include/asm | |
parent | bb11d46b72a4a2b53f890faa970a380cf0084bf2 (diff) |
Cherry-pick commit f4ac102a1f66ae4fb3942ac5c41bc1f2923b4730
ARMv7: Use lazy cache flushing if hardware broadcasts cache operations
ARMv7 processors like Cortex-A9 broadcast the cache maintenance
operations in hardware. The patch adds the CPU ID checks for such
feature and allows the flush_dcache_page/update_mmu_cache pair to work
in lazy flushing mode similar to the UP case.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Conflicts:
arch/arm/include/asm/smp_plat.h
arch/arm/mm/flush.c
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/smp_plat.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h new file mode 100644 index 000000000000..e587167edacb --- /dev/null +++ b/arch/arm/include/asm/smp_plat.h @@ -0,0 +1,25 @@ +/* + * ARM specific SMP header, this contains our implementation + * details. + */ +#ifndef __ASMARM_SMP_PLAT_H +#define __ASMARM_SMP_PLAT_H + +#include <asm/cputype.h> + +/* all SMP configurations have the extended CPUID registers */ +static inline int tlb_ops_need_broadcast(void) +{ + return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2; +} + +#ifndef CONFIG_SMP +#define cache_ops_need_broadcast() 0 +#else +static inline int cache_ops_need_broadcast(void) +{ + return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1; +} +#endif + +#endif |