Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 Sprinkle some KASSERT(kpreempt_disa...
details: https://anonhg.NetBSD.org/src/rev/66239c435f19
branches: trunk
changeset: 365928:66239c435f19
user: skrll <skrll%NetBSD.org@localhost>
date: Tue May 03 20:09:54 2022 +0000
description:
Sprinkle some KASSERT(kpreempt_disabled());
diffstat:
sys/arch/aarch64/aarch64/pmap.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r c00c8209d64b -r 66239c435f19 sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c Tue May 03 19:05:34 2022 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c Tue May 03 20:09:54 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.136 2022/04/27 23:38:31 ryo Exp $ */
+/* $NetBSD: pmap.c,v 1.137 2022/05/03 20:09:54 skrll Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.136 2022/04/27 23:38:31 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.137 2022/05/03 20:09:54 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_cpuoptions.h"
@@ -1502,6 +1502,8 @@
UVMHIST_FUNC(__func__);
UVMHIST_CALLARGS(pmaphist, " (pm=%#jx)", (uintptr_t)pm, 0, 0, 0);
+ KASSERT(kpreempt_disabled());
+
ci->ci_pmap_asid_cur = pai->pai_asid;
UVMHIST_LOG(pmaphist, "setting asid to %#jx", pai->pai_asid,
0, 0, 0);
@@ -1527,6 +1529,7 @@
UVMHIST_CALLARGS(pmaphist, "lwp=%p (pid=%d, kernel=%u)", l,
l->l_proc->p_pid, pm == pmap_kernel() ? 1 : 0, 0);
+ KASSERT(kpreempt_disabled());
KASSERT((reg_tcr_el1_read() & TCR_EPD0) != 0);
if (pm == pmap_kernel())
@@ -1561,6 +1564,8 @@
UVMHIST_FUNC(__func__); UVMHIST_CALLED(pmaphist);
+ KASSERT(kpreempt_disabled());
+
/* Disable translation table walks using TTBR0 */
uint64_t tcr = reg_tcr_el1_read();
reg_tcr_el1_write(tcr | TCR_EPD0);
@@ -1588,6 +1593,8 @@
UVMHIST_CALLARGS(pmaphist, "lwp=%p (pid=%d, (kernel=%u))", l,
l->l_proc->p_pid, pm == pmap_kernel() ? 1 : 0, 0);
+ KASSERT(kpreempt_disabled());
+
/* Disable translation table walks using TTBR0 */
tcr = reg_tcr_el1_read();
reg_tcr_el1_write(tcr | TCR_EPD0);
Home |
Main Index |
Thread Index |
Old Index