[PATCH v2] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

Ard Biesheuvel ard.biesheuvel at linaro.org
Sat Apr 11 00:35:15 PDT 2015


On 10 April 2015 at 22:23, Ard Biesheuvel <ard.biesheuvel at linaro.org> wrote:
>
>> On 10 apr. 2015, at 22:08, Arnd Bergmann <arnd at arndb.de> wrote:
>>
>>> On Friday 10 April 2015 16:29:08 Ard Biesheuvel wrote:
>>> +#if __ARM_MAX_ARCH__>=7
>>> +.arch  armv7-a
>>> +.fpu   neon
>>> +
>>
>> This will cause a build failure on an ARMv7-M build, which is incompatible
>> with .arch  armv7-a and .fpu   neon.
>>
>
> The neon part depends on CONFIG_KERNEL_MODE_NEON, which would never be set for that platform, I suppose

On second thought, that is not entirely true, but I still don't think
there is problem here:
the .arch/.fpu declarations are understood perfectly fine by GAS when
targeting ARMv7-M. Only, it will emit code that is incompatible with
it. However, this code is invoked at runtime only if a NEON unit has
been detected, so it will just be ignored on ARMv7-M

-- 
Ard.



More information about the linux-arm-kernel mailing list