Add a instruction barrier between writing CCSELR_EL1 and reading CCSIDR_EL1
authorkettenis <kettenis@openbsd.org>
Wed, 10 Feb 2021 20:51:27 +0000 (20:51 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 10 Feb 2021 20:51:27 +0000 (20:51 +0000)
commitb2fd32ba746dfde4a07ff2fa1990bfa5287c11f8
treea96eb627bec0025ee44d11b844e4c6f02f897ca7
parent1d3b3d6ee306456e17986bdc6a0006e0722a5a0a
Add a instruction barrier between writing CCSELR_EL1 and reading CCSIDR_EL1
to guarantee that we read the cache parameters of the cache we just selected.
The required ISB instruction is present in the examples in the ARM ARM.
Fixes the the report on the cores in Apple's M1 SoC.

ok patrick@
sys/arch/arm64/arm64/cpu.c