Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap Pass the pmap in tlb_set_asid for the benefit o...
details: https://anonhg.NetBSD.org/src/rev/c353a6564ef2
branches: trunk
changeset: 988193:c353a6564ef2
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Oct 02 14:28:04 2021 +0000
description:
Pass the pmap in tlb_set_asid for the benefit of aarch64.
diffstat:
sys/arch/arm/arm32/arm32_tlb.c | 4 ++--
sys/arch/mips/mips/mips_fixup.c | 8 ++++----
sys/arch/mips/mips/pmap_machdep.c | 6 +++---
sys/arch/powerpc/booke/booke_pmap.c | 6 +++---
sys/arch/powerpc/booke/booke_stubs.c | 8 ++++----
sys/arch/riscv/riscv/pmap_machdep.c | 6 +++---
sys/uvm/pmap/pmap_tlb.c | 8 ++++----
sys/uvm/pmap/tlb.h | 5 +++--
8 files changed, 26 insertions(+), 25 deletions(-)
diffs (231 lines):
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/arm/arm32/arm32_tlb.c
--- a/sys/arch/arm/arm32/arm32_tlb.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/arm/arm32/arm32_tlb.c Sat Oct 02 14:28:04 2021 +0000
@@ -31,7 +31,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.14 2020/10/30 18:54:36 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: arm32_tlb.c,v 1.15 2021/10/02 14:28:04 skrll Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -50,7 +50,7 @@
}
void
-tlb_set_asid(tlb_asid_t asid)
+tlb_set_asid(tlb_asid_t asid, pmap_t pm)
{
dsb(sy);
if (asid == KERNEL_PID) {
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/mips/mips/mips_fixup.c
--- a/sys/arch/mips/mips/mips_fixup.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/mips/mips/mips_fixup.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_fixup.c,v 1.21 2021/02/16 06:06:58 simonb Exp $ */
+/* $NetBSD: mips_fixup.c,v 1.22 2021/10/02 14:28:04 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.21 2021/02/16 06:06:58 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.22 2021/10/02 14:28:04 skrll Exp $");
#include "opt_mips3_wired.h"
#include "opt_multiprocessor.h"
@@ -545,7 +545,7 @@
void mips_cpu_switch_resume(struct lwp *) __stub;
tlb_asid_t
tlb_get_asid(void) __stub;
-void tlb_set_asid(uint32_t) __stub;
+void tlb_set_asid(uint32_t, struct pmap *) __stub;
void tlb_invalidate_all(void) __stub;
void tlb_invalidate_globals(void) __stub;
void tlb_invalidate_asids(uint32_t, uint32_t) __stub;
@@ -575,7 +575,7 @@
}
void
-tlb_set_asid(uint32_t asid)
+tlb_set_asid(uint32_t asid, struct pmap *pm)
{
(*mips_locore_jumpvec.ljv_tlb_set_asid)(asid);
}
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/mips/mips/pmap_machdep.c
--- a/sys/arch/mips/mips/pmap_machdep.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/mips/mips/pmap_machdep.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_machdep.c,v 1.35 2021/10/02 13:41:50 skrll Exp $ */
+/* $NetBSD: pmap_machdep.c,v 1.36 2021/10/02 14:28:04 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.35 2021/10/02 13:41:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_machdep.c,v 1.36 2021/10/02 14:28:04 skrll Exp $");
/*
* Manages physical address maps.
@@ -492,7 +492,7 @@
pool_init(&pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pvpl",
&pmap_pv_page_allocator, IPL_NONE);
- tlb_set_asid(KERNEL_PID);
+ tlb_set_asid(KERNEL_PID, pmap_kernel());
#ifdef MIPS3_PLUS /* XXX mmu XXX */
/*
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/powerpc/booke/booke_pmap.c
--- a/sys/arch/powerpc/booke/booke_pmap.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/powerpc/booke/booke_pmap.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: booke_pmap.c,v 1.33 2021/10/02 13:41:50 skrll Exp $ */
+/* $NetBSD: booke_pmap.c,v 1.34 2021/10/02 14:28:04 skrll Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -37,7 +37,7 @@
#define __PMAP_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.33 2021/10/02 13:41:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_pmap.c,v 1.34 2021/10/02 14:28:04 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
@@ -300,7 +300,7 @@
pool_init(&pmap_pv_pool, sizeof(struct pv_entry), 0, 0, 0, "pvpl",
&pmap_pv_page_allocator, IPL_NONE);
- tlb_set_asid(KERNEL_PID);
+ tlb_set_asid(KERNEL_PID, pmap_kernel());
return endkernel;
}
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/powerpc/booke/booke_stubs.c
--- a/sys/arch/powerpc/booke/booke_stubs.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/powerpc/booke/booke_stubs.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: booke_stubs.c,v 1.11 2020/07/06 09:34:16 rin Exp $ */
+/* $NetBSD: booke_stubs.c,v 1.12 2021/10/02 14:28:04 skrll Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: booke_stubs.c,v 1.11 2020/07/06 09:34:16 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: booke_stubs.c,v 1.12 2021/10/02 14:28:04 skrll Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -45,10 +45,10 @@
#define __stub __section(".stub") __noprofile
-void tlb_set_asid(tlb_asid_t) __stub;
+void tlb_set_asid(tlb_asid_t, struct pmap *) __stub;
void
-tlb_set_asid(tlb_asid_t asid)
+tlb_set_asid(tlb_asid_t asid, struct pmap *pm)
{
(*cpu_md_ops.md_tlb_ops->md_tlb_set_asid)(asid);
}
diff -r 228ce46d5a3f -r c353a6564ef2 sys/arch/riscv/riscv/pmap_machdep.c
--- a/sys/arch/riscv/riscv/pmap_machdep.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/arch/riscv/riscv/pmap_machdep.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_machdep.c,v 1.7 2021/05/01 07:41:24 skrll Exp $ */
+/* $NetBSD: pmap_machdep.c,v 1.8 2021/10/02 14:28:05 skrll Exp $ */
/*
* Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pmap_machdep.c,v 1.7 2021/05/01 07:41:24 skrll Exp $");
+__RCSID("$NetBSD: pmap_machdep.c,v 1.8 2021/10/02 14:28:05 skrll Exp $");
#include <sys/param.h>
@@ -171,7 +171,7 @@
}
void
-tlb_set_asid(tlb_asid_t asid)
+tlb_set_asid(tlb_asid_t asid, struct pmap *pm)
{
riscvreg_asid_write(asid);
}
diff -r 228ce46d5a3f -r c353a6564ef2 sys/uvm/pmap/pmap_tlb.c
--- a/sys/uvm/pmap/pmap_tlb.c Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/uvm/pmap/pmap_tlb.c Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.45 2021/09/12 09:05:01 skrll Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.46 2021/10/02 14:28:05 skrll Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.45 2021/09/12 09:05:01 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.46 2021/10/02 14:28:05 skrll Exp $");
/*
* Manages address spaces in a TLB.
@@ -958,7 +958,7 @@
ci->ci_pmap_asid_cur = pai->pai_asid;
UVMHIST_LOG(maphist, "setting asid to %#jx", pai->pai_asid,
0, 0, 0);
- tlb_set_asid(pai->pai_asid);
+ tlb_set_asid(pai->pai_asid, pm);
pmap_tlb_asid_check();
} else {
printf("%s: l (%p) != curlwp %p\n", __func__, l, curlwp);
@@ -996,7 +996,7 @@
}
#endif
curcpu()->ci_pmap_asid_cur = KERNEL_PID;
- tlb_set_asid(KERNEL_PID);
+ tlb_set_asid(KERNEL_PID, pmap_kernel());
pmap_tlb_pai_check(cpu_tlb_info(curcpu()), false);
#if defined(DEBUG)
diff -r 228ce46d5a3f -r c353a6564ef2 sys/uvm/pmap/tlb.h
--- a/sys/uvm/pmap/tlb.h Sat Oct 02 13:41:50 2021 +0000
+++ b/sys/uvm/pmap/tlb.h Sat Oct 02 14:28:04 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlb.h,v 1.4 2017/06/24 05:31:03 skrll Exp $ */
+/* $NetBSD: tlb.h,v 1.5 2021/10/02 14:28:05 skrll Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -33,6 +33,7 @@
#if defined(_KERNEL) || defined(_KMEMUSER)
struct tlbmask;
+struct pmap;
typedef bool (*tlb_walkfunc_t)(void *, vaddr_t, tlb_asid_t, pt_entry_t);
@@ -54,7 +55,7 @@
tlb_asid_t
tlb_get_asid(void);
-void tlb_set_asid(tlb_asid_t);
+void tlb_set_asid(tlb_asid_t, struct pmap *);
void tlb_invalidate_all(void);
void tlb_invalidate_globals(void);
void tlb_invalidate_asids(tlb_asid_t, tlb_asid_t);
Home |
Main Index |
Thread Index |
Old Index