Skip to content

Commit

Permalink
ARM: 6429/1: Check for is_smp for tlb_ops and cache_ops broadcast
Browse files Browse the repository at this point in the history
Broadcast should not be needed when running SMP kernel on UP systems.

Also, this fixes an undefined instruction for SMP_ON_UP on earlier ARM
cores without the extended CPUID_EXT_MMFR3 register.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Tony Lindgren authored and Russell King committed Oct 8, 2010
1 parent 81d1195 commit 7511db9
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions arch/arm/include/asm/smp_plat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@

#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;
}

static inline int cache_ops_need_broadcast(void)
{
return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1;
}

/*
* Return true if we are running on a SMP platform
*/
Expand All @@ -33,4 +22,21 @@ static inline bool is_smp(void)
#endif
}

/* all SMP configurations have the extended CPUID registers */
static inline int tlb_ops_need_broadcast(void)
{
if (!is_smp())
return 0;

return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 2;
}

static inline int cache_ops_need_broadcast(void)
{
if (!is_smp())
return 0;

return ((read_cpuid_ext(CPUID_EXT_MMFR3) >> 12) & 0xf) < 1;
}

#endif

0 comments on commit 7511db9

Please sign in to comment.