ARM: 7385/1: ThumbEE: Use cpuid macros to read ID_PFR0 for ThumbEE
authorJonathan Austin <Jonathan.Austin@arm.com>
Thu, 12 Apr 2012 16:52:10 +0000 (17:52 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 25 Apr 2012 18:49:26 +0000 (19:49 +0100)
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>
arch/arm/kernel/thumbee.c

index aab899764053d639a208e241357646e9dc20407b..7b8403b7666617f30baca2fec58fb579615e679b 100644 (file)
@@ -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>
 
@@ -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;
 
This page took 0.03853 seconds and 5 git commands to generate.