Commit 58834eecdeaab191b7c07a5eba8fdf9b637156e8

Authored by Jonathan Austin
Committed by Russell King
1 parent ce94df9c09

ARM: 7385/1: ThumbEE: Use cpuid macros to read ID_PFR0 for ThumbEE

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 <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

arch/arm/kernel/thumbee.c
... ... @@ -20,6 +20,7 @@
20 20 #include <linux/kernel.h>
21 21 #include <linux/init.h>
22 22  
  23 +#include <asm/cputype.h>
23 24 #include <asm/system_info.h>
24 25 #include <asm/thread_notify.h>
25 26  
... ... @@ -67,8 +68,7 @@
67 68 if (cpu_arch < CPU_ARCH_ARMv7)
68 69 return 0;
69 70  
70   - /* processor feature register 0 */
71   - asm("mrc p15, 0, %0, c0, c1, 0\n" : "=r" (pfr0));
  71 + pfr0 = read_cpuid_ext(CPUID_EXT_PFR0);
72 72 if ((pfr0 & 0x0000f000) != 0x00001000)
73 73 return 0;
74 74