Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hppa/hppa Give pmap uvm_objects an empty pagerops t...
details: https://anonhg.NetBSD.org/src/rev/31757c56f828
branches: trunk
changeset: 969800:31757c56f828
user: ad <ad%NetBSD.org@localhost>
date: Sun Mar 01 21:40:45 2020 +0000
description:
Give pmap uvm_objects an empty pagerops to avoid special casing in UVM.
(This use of uvm_object causes a disproportionate amount of work.)
diffstat:
sys/arch/hppa/hppa/pmap.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r 49c37aa67501 -r 31757c56f828 sys/arch/hppa/hppa/pmap.c
--- a/sys/arch/hppa/hppa/pmap.c Sun Mar 01 21:39:07 2020 +0000
+++ b/sys/arch/hppa/hppa/pmap.c Sun Mar 01 21:40:45 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $ */
+/* $NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $ */
/*-
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.104 2020/02/24 20:42:18 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.105 2020/03/01 21:40:45 ad Exp $");
#include "opt_cputype.h"
@@ -158,6 +158,10 @@
u_int hppa_prot[8];
u_int sid_counter;
+static const struct uvm_pagerops pmap_pager = {
+ /* nothing */
+};
+
/*
* Page 3-6 of the "PA-RISC 1.1 Architecture and Instruction Set
* Reference Manual" (HP part number 09740-90039) defines equivalent
@@ -696,7 +700,7 @@
memset(kpm, 0, sizeof(*kpm));
rw_init(&kpm->pm_obj_lock);
- uvm_obj_init(&kpm->pm_obj, NULL, false, 1);
+ uvm_obj_init(&kpm->pm_obj, &pmap_pager, false, 1);
uvm_obj_setlock(&kpm->pm_obj, &kpm->pm_obj_lock);
kpm->pm_space = HPPA_SID_KERNEL;
@@ -1059,7 +1063,7 @@
DPRINTF(PDB_FOLLOW|PDB_PMAP, ("%s: pmap = %p\n", __func__, pmap));
rw_init(&pmap->pm_obj_lock);
- uvm_obj_init(&pmap->pm_obj, NULL, false, 1);
+ uvm_obj_init(&pmap->pm_obj, &pmap_pager, false, 1);
uvm_obj_setlock(&pmap->pm_obj, &pmap->pm_obj_lock);
mutex_enter(&pmaps_lock);
Home |
Main Index |
Thread Index |
Old Index