RFR: 8255799: AArch64: CPU_A53MAC feature may be set incorrectly

Nick Gasson ngasson at openjdk.java.net
Thu Nov 5 11:31:57 UTC 2020


On Thu, 5 Nov 2020 10:40:33 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

> > 
> > We should delete lines 184-187 in the current file: this isn't working as intended since the switch to `os::processor_count()` and as discussed the ancient kernel versions where this was necessary should no longer be in use.
> 
> In general, I support to abandon this and remove the CPU_A53MAC instead. But the use of the flag is not clear for me
> 
> https://github.com/openjdk/jdk/blob/f279ddfa06392f8ea14224e478a00bad33b84e7a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp#L447
> This code does not check if there is a mix of CPU types, but does for exact type/number-of-cores combination that stands behind the flag. I don't feel comfortable to remove this `nop` now. It will be great if If someone can clarify this. Meanwhile, I'll check for `madd`/`msub`/... and will followup.
> 

I wasn't suggesting removing CPU_A53MAC entirely - that will always be required to work around an A53 hardware errata and we should set it whenever we detect an A53 in cpuinfo. What I meant was remove the logic on lines 184-187 that sets this flag if there is only one CPU listed in /proc/cpuinfo and that CPU is an A57. This exists to handle old Linux kernels that only reported CPU features for a single core in cpuinfo: it's possible on a mixed A53/A57 system that only the A57 features are reported but there's also an A53 lurking, in which case we still need to apply the MAC workaround in the JIT. The kernel was patched long ago to print the features of every CPU in /proc/cpuinfo so this check is no longer required.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1039


More information about the hotspot-dev mailing list