[PATCH 2/2] arm: Make VFPv3 usable on ARMv6

Tony Lindgren tony at atomide.com
Tue Jun 22 09:20:38 EDT 2010


* Catalin Marinas <catalin.marinas at arm.com> [100622 15:53]:
> On Mon, 2010-06-21 at 14:51 +0100, Tony Lindgren wrote:
> > diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
> > index 315a540..19ba626 100644
> > --- a/arch/arm/vfp/vfpmodule.c
> > +++ b/arch/arm/vfp/vfpmodule.c
> > @@ -549,10 +549,14 @@ static int __init vfp_init(void)
> >                 /*
> >                  * Check for the presence of the Advanced SIMD
> >                  * load/store instructions, integer and single
> > -                * precision floating point operations.
> > +                * precision floating point operations. Only check
> > +                * for NEON if the hardware has TLS register as the
> > +                * MVFR registers got added in ARM1136 r1p0 with TLS.
> >                  */
> > -               if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
> > -                       elf_hwcap |= HWCAP_NEON;
> > +               if (elf_hwcap & HWCAP_TLS) {
> > +                       if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100)
> > +                               elf_hwcap |= HWCAP_NEON;
> > +               }
> 
> MVFR should be available with the new CPU id format:
> 
> 	((read_cpuid_id() & 0x000f0000) == 0x000f0000)
> 
> I think that would be a cleaner test than relying on the TLS presence.

OK, thanks that's better. Will update accordingly and repost.

Tony



More information about the linux-arm-kernel mailing list