Skip to content

Commit

Permalink
ARM: 7385/1: ThumbEE: Use cpuid macros to read ID_PFR0 for ThumbEE
Browse files Browse the repository at this point in the history
The ThumbEE probe code uses inline assembly to read ID_PFR0 in order to
detect whether ThumbEE is implemented by the processor.

This patch replaces the inline asm with the read_cpuid_ext macro.

Reviewed-by: Will Deacon <[email protected]>
Signed-off-by: Jonathan Austin <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
jaustin authored and Russell King committed Apr 25, 2012
1 parent ce94df9 commit 58834ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/kernel/thumbee.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/kernel.h>
#include <linux/init.h>

#include <asm/cputype.h>
#include <asm/system_info.h>
#include <asm/thread_notify.h>

Expand Down Expand Up @@ -67,8 +68,7 @@ static int __init thumbee_init(void)
if (cpu_arch < CPU_ARCH_ARMv7)
return 0;

/* processor feature register 0 */
asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0));
pfr0 = read_cpuid_ext(CPUID_EXT_PFR0);
if ((pfr0 & 0x0000f000) != 0x00001000)
return 0;

Expand Down

0 comments on commit 58834ee

Please sign in to comment.