From 45fadd520b7219dfb039a6bc5e8c5c1d5b66480a Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 13 Jan 2018 10:58:50 +0000 Subject: [PATCH] Add a barrier at the end of pmap_map_early() such that the new mapping is guaranteed to be available after pmap_map_early() returns. Fixes a hang seen with the in-progress SMP work. ok patrick@ --- sys/arch/arm64/arm64/pmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c index cfa70ba46ec..65503d8d33d 100644 --- a/sys/arch/arm64/arm64/pmap.c +++ b/sys/arch/arm64/arm64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.44 2018/01/12 14:52:55 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.45 2018/01/13 10:58:50 kettenis Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn * @@ -2055,6 +2055,8 @@ pmap_map_early(paddr_t spa, psize_t len) ATTR_IDX(PTE_ATTR_WB) | ATTR_SH(SH_INNER) | ATTR_nG | ATTR_UXN | ATTR_AF | ATTR_AP(0); } + __asm volatile("dsb sy"); + __asm volatile("isb"); } /* -- 2.20.1