Skip to content

Commit 58834ee

Browse files
jaustinRussell King
authored andcommitted
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>
1 parent ce94df9 commit 58834ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/arm/kernel/thumbee.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/kernel.h>
2121
#include <linux/init.h>
2222

23+
#include <asm/cputype.h>
2324
#include <asm/system_info.h>
2425
#include <asm/thread_notify.h>
2526

@@ -67,8 +68,7 @@ static int __init thumbee_init(void)
6768
if (cpu_arch < CPU_ARCH_ARMv7)
6869
return 0;
6970

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);
7272
if ((pfr0 & 0x0000f000) != 0x00001000)
7373
return 0;
7474

0 commit comments

Comments
 (0)