diff mbox series

[02/28] configs/acmesystems_acqua_a5_512mb_defconfig: enable NEON/VFPV4 FPU strategy

Message ID 20220118104338.2081259-3-giulio.benetti@benettiengineering.com
State Rejected
Headers show
Series Use the best FPU strategies on 32-bits Arm Cortex | expand

Commit Message

Giulio Benetti Jan. 18, 2022, 10:43 a.m. UTC
As pointed by SAMA5D2 Datasheet[1]:
```
The Cortex-A5 NEON Media Processing Engine (MPE) extends the Cortex-A5
functionality to provide support for the ARM v7 Advanced SIMD v2 and
Vector Floating-Point v4 (VFPv4) instruction sets.
```

So let's enable VFPV4/NEON FPU strategy instead of the default VFPV4-D16.

[1]: https://ww1.microchip.com/downloads/aemDocuments/documents/MPU32/ProductDocuments/DataSheets/SAMA5D2-Series-Data-sheet-ds60001476G.pdf

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 configs/acmesystems_acqua_a5_512mb_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Edgar Bonet Jan. 18, 2022, 12:58 p.m. UTC | #1
Hi!

[Replying to list only, hoping it is the right etiquette.]

Giulio Benetti wrote:
> --- a/configs/acmesystems_acqua_a5_512mb_defconfig
> +++ b/configs/acmesystems_acqua_a5_512mb_defconfig
> @@ -1,6 +1,7 @@
>  BR2_arm=y
>  BR2_cortex_a5=y
>  BR2_ARM_ENABLE_VFP=y
> +BR2_ARM_FPU_NEON_VFPV4=y
>  BR2_ARM_INSTRUCTIONS_THUMB2=y
>  BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
>  BR2_SYSTEM_DHCP="eth0"

I think this may be missing some dependencies, as this change does not
survive `save defconfig'. I tried the following from a clean tree:

    git pull # from master
    git am ~/tmp/saved-patch.email  # the patch above
    make acmesystems_acqua_a5_512mb_defconfig
    make nconfig
        # no changes to configuration
        <F6> Save
        <F9> Exit
    make savedefconfig
    git diff

And git showed me that the patch had just been reverted on the worktree.
According to arch/Config.in.arm, BR2_ARM_FPU_NEON_VFPV4 depends on
BR2_ARM_CPU_HAS_NEON, which is not mentioned in my .config. It also
appears that BR2_ARM_ENABLE_NEON selects BR2_ARM_CPU_HAS_NEON. Would
BR2_ARM_ENABLE_NEON be the canonical way of making
BR2_ARM_FPU_NEON_VFPV4 acceptable? I am a bit confused by the VFP
selection logic in arch/Config.in.arm, so I am not sure that would be
the right approach.

As a follow up question, if this issue is fixed, what would be the
simplest way of testing the floating point implementation on the board?
I was thinking about adding gnuplot, which doesn't have any
dependencies, and having it do some computations. I do not know,
however, whether this would exercise the NEON SIMD extensions.

Best regards,

Edgar.
Edgar Bonet Jan. 18, 2022, 1:28 p.m. UTC | #2
Hi again!

Giulio Benetti wrote:
> As pointed by SAMA5D2 Datasheet [...] So let's enable VFPV4/NEON FPU
> strategy instead of the default VFPV4-D16.

BTW, the Acqua is a SAMA5D3[1] (SAMA5D31 or SAMA5D36, depending on the
version), not a SAMA5D2. The datasheet[2] of the SAMA5D3 states:

    The Floating-Point Unit (FPU) supports the ARMv7 VFPv4-D16
    architecture without Advanced SIMD extensions (NEON).

So I guess the patch is not relevant to this board.

[1] https://www.acmesystems.it/acqua
[2] https://ww1.microchip.com/downloads/en/DeviceDoc/SAMA5D3-Series-Data-sheet-DS60001609b.pdf
Giulio Benetti Jan. 18, 2022, 1:35 p.m. UTC | #3
Hi Edgar,

On 18/01/22 14:28, Edgar Bonet wrote:
> Hi again!
> 
> Giulio Benetti wrote:
>> As pointed by SAMA5D2 Datasheet [...] So let's enable VFPV4/NEON FPU
>> strategy instead of the default VFPV4-D16.
> 
> BTW, the Acqua is a SAMA5D3[1] (SAMA5D31 or SAMA5D36, depending on the
> version), not a SAMA5D2. The datasheet[2] of the SAMA5D3 states:
> 
>      The Floating-Point Unit (FPU) supports the ARMv7 VFPv4-D16
>      architecture without Advanced SIMD extensions (NEON).

Ah, thank you. I had the SAMA5D3 opened and I couldn't find anymore 
which board used it. I thought it was this one. Thanks for pointing.

> So I guess the patch is not relevant to this board.

Exactly. So please drop this patch and I've set it as rejected in Patchwork.

I'll go in depth later with patch 01/28.

Thank you for the answers!
Best regards
diff mbox series

Patch

diff --git a/configs/acmesystems_acqua_a5_512mb_defconfig b/configs/acmesystems_acqua_a5_512mb_defconfig
index e399d4a9ff..56885ea5a1 100644
--- a/configs/acmesystems_acqua_a5_512mb_defconfig
+++ b/configs/acmesystems_acqua_a5_512mb_defconfig
@@ -1,6 +1,7 @@ 
 BR2_arm=y
 BR2_cortex_a5=y
 BR2_ARM_ENABLE_VFP=y
+BR2_ARM_FPU_NEON_VFPV4=y
 BR2_ARM_INSTRUCTIONS_THUMB2=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
 BR2_SYSTEM_DHCP="eth0"