git: 8f95edc10dca - releng/13.1 - arm64: Add explicit barrier after address translation instruction
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Mar 2022 21:04:40 UTC
The branch releng/13.1 has been updated by scottph:
URL: https://cgit.FreeBSD.org/src/commit/?id=8f95edc10dca552937c871a236c89e77318af9f7
commit 8f95edc10dca552937c871a236c89e77318af9f7
Author: D Scott Phillips <scottph@FreeBSD.org>
AuthorDate: 2022-03-25 16:04:47 +0000
Commit: D Scott Phillips <scottph@FreeBSD.org>
CommitDate: 2022-03-30 20:51:43 +0000
arm64: Add explicit barrier after address translation instruction
Following ARMARM sec D5.2.11, which says:
> Where an instruction results in an update to a System register,
> as is the case with the AT * address translation instructions,
> explicit synchronization must be performed before the result is
> guaranteed to be visible to subsequent direct reads of the
> PAR_EL1.
Approved by: re (gjb)
Reviewed By: andrew
MFC after: 3 weeks
Sponsored by: Ampere Computing
Differential Revision: https://reviews.freebsd.org/D34665
(cherry picked from commit 7be7bd67758520ea2f9784a81ad244e99a7632f0)
(cherry picked from commit 0e19a22dd145c3e508978500a3b78592c84db5d0)
---
sys/arm64/include/cpu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index c926372a0ec6..b37301c276ce 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -198,7 +198,8 @@ arm64_address_translate_ ##stage (uint64_t addr) \
uint64_t ret; \
\
__asm __volatile( \
- "at " __STRING(stage) ", %1 \n" \
+ "at " __STRING(stage) ", %1 \n" \
+ "isb \n" \
"mrs %0, par_el1" : "=r"(ret) : "r"(addr)); \
\
return (ret); \