Skip to content

arm64: errata: remove BF16 HWCAP due to incorrect result on Cortex-A510

James Morse linux-arm-kernel 1 version Applied

Status from this message: Applied to arm64 (for-next/a510-erratum-2658417), thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-spacearch/arm64/kernel/cpufeature.c+32 -91 reply
2/3arm64: cpufeature: Expose get_arm64_ftr_reg() outside cpufeature.carch/arm64/include/asm/cpufeature.h arch/arm64/kernel/cpufeature.c+3 -11 reply
3/3arm64: errata: remove BF16 HWCAP due to incorrect result on Cortex-A510Documentation/arm64/silicon-errata.rst arch/arm64/Kconfig arch/arm64/kernel/cpu_errata.c +1 more+44 -02 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchSuzuki K Poulose
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] arm64: errata: remove BF16 HWCAP due to incorrect result on Cortex-A510

Hello!

Cortex-A510 has an erratum where the BFMMLA or VMMLA instructions might produce the incorrect result. This only happens if two Cortex-A510 CPUs are configured by the SoC manafacturer in a particular way to share some hardware, and are using it at the same time. It isn't possible for linux to know how the CPUs were configured, so the only option is to disable the BF16 feature for all Cortex-A510 CPUs.

This won't stop user-space from trying to use the instructions to see if they work - but such software is already broken on big/little systems with mismathed features.

Removing the BF16 feature involves removing both the HWCAP, as was done by commit 44b3834b2eed "arm64: errata: Remove AES hwcap for COMPAT tasks", and the emulated view of that register that user-space has. (This wasn't previously needed as aarch32 ID registers aren't accessible like this).

As there are now two of these things, this series tries to add a more maintainable way to remove features, to avoid spilling workaround like this into cpufeature.c.

Instead, cpu_errata.c modifies the user_mask that is used for emulation of the id registers, and cpufeature.c builds the HWCAPs based on this.

I have patches to convert the AES workaround to do the same, but that should wait until the aarch32 ID registers are generated by the sysreg awk scripts (it needs some new masks defined).

[0] https://developer.arm.com/documentation/SDEN1873351/1400/?lang=en

Thanks,

James Morse (3):
arm64: cpufeature: Force HWCAP to be based on the sysreg visible to
user-space
arm64: cpufeature: Expose get_arm64_ftr_reg() outside cpufeature.c
arm64: errata: remove BF16 HWCAP due to incorrect result on

    Cortex-A510
 Documentation/arm64/silicon-errata.rst |  2 ++
 arch/arm64/Kconfig                     | 14 +++++++++
 arch/arm64/include/asm/cpufeature.h    |  2 ++
 arch/arm64/kernel/cpu_errata.c         | 27 ++++++++++++++++
 arch/arm64/kernel/cpufeature.c         | 43 ++++++++++++++++++++------
 arch/arm64/tools/cpucaps               |  1 +
 6 files changed, 79 insertions(+), 10 deletions(-)
Signature · 7 lines
2.30.2


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel