From 56b78ca59cbfd762e5ec5804f635fa46fe31dec2 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Wed, 23 Nov 2011 18:43:21 -0800 Subject: [PATCH] ARM: vfp: Add Krait MVFR1 workaround Certain early samples of the Krait processor use the MVFR1 register to report that they do not support ASE instructions, despite actually supporting these instructions. Add a specific CPU ID check to allow full utilization of the ASE instructions. Change-Id: Id8182da98d438fd4169cfdfa014b4771388fb6f7 Signed-off-by: Stepan Moskovchenko (cherry picked from commit 57b50da38c95732c0727b8016e77cd86e08f153d) --- arch/arm/vfp/vfpmodule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index da3b9292f9f..032f2f127e3 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -713,7 +713,9 @@ static int __init vfp_init(void) if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) elf_hwcap |= HWCAP_NEON; #endif - if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000) + + if ((fmrx(MVFR1) & 0xf0000000) == 0x10000000 || + (read_cpuid_id() & 0xff00fc00) == 0x51000400) elf_hwcap |= HWCAP_VFPv4; } }