-/* $OpenBSD: pmap.h,v 1.45 2023/04/13 15:23:21 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.46 2023/12/11 22:12:52 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
#define pmap_update(pmap) /* nothing (yet) */
#define pmap_proc_iflush(p, va, len) /* nothing */
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.86 2023/04/13 15:23:21 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.87 2023/12/11 22:12:52 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.54 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.55 2023/12/11 22:12:53 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
#define pmap_deactivate(p) do { /* nothing */ } while (0)
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.c,v 1.99 2023/08/10 19:29:32 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.100 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
npages * PAGE_SIZE, VM_MAP_INTRSAFE, FALSE, NULL);
}
+void
+pmap_init_percpu(void)
+{
+ pool_cache_init(&pmap_pted_pool);
+ pool_cache_init(&pmap_vp_pool);
+}
+
void
pmap_update(pmap_t pm)
{
-/* $OpenBSD: pmap.h,v 1.24 2023/06/10 19:30:48 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.25 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 2008,2009,2014 Dale Rahn <drahn@dalerahn.com>
*
vaddr_t pmap_bootstrap(long kvo, paddr_t lpt1, long kernelstart,
long kernelend, long ram_start, long ram_end);
+void pmap_postinit(void);
+void pmap_init_percpu(void);
+
void pmap_kenter_cache(vaddr_t va, paddr_t pa, vm_prot_t prot, int cacheable);
void pmap_page_ro(pmap_t pm, vaddr_t va, vm_prot_t prot);
void pmap_page_rw(pmap_t pm, vaddr_t va);
/* investigate */
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
int pmap_fault_fixup(pmap_t, vaddr_t, vm_prot_t);
-void pmap_postinit(void);
#define __HAVE_PMAP_MPSAFE_ENTER_COW
-/* $OpenBSD: pmap.h,v 1.55 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.56 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
#define pmap_is_modified(pg) pmap_testbit(pg, PG_PMAP_MOD)
#define pmap_is_referenced(pg) pmap_testbit(pg, PG_PMAP_REF)
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.93 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.94 2023/12/11 22:12:53 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.29 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.30 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
void pmap_unmap_firmware(void);
boolean_t pmap_unsetbit(struct vm_page *, int);
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.53 2023/01/31 15:18:55 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.54 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
int pmap_emulate_modify(pmap_t, vaddr_t);
void pmap_page_cache(vm_page_t, u_int);
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing yet */ } while (0)
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.64 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.65 2023/12/11 22:12:53 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
int pte_spill_v(struct pmap *pm, u_int32_t va, u_int32_t dsisr, int exec_fault);
int reserve_dumppages(caddr_t p);
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) /* nothing */
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.h,v 1.18 2021/10/12 18:06:15 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.19 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count)
#define pmap_wired_count(pm) ((pm)->pm_stats.wired_count)
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p)
#define pmap_remove_holes(vm)
#define pmap_update(pm)
-/* $OpenBSD: pmap.h,v 1.8 2023/11/24 07:18:49 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.9 2023/12/11 22:12:53 kettenis Exp $ */
/*
* Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com>
struct pv_entry;
/* investigate */
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
int pmap_fault_fixup(pmap_t, vaddr_t, vm_prot_t);
void pmap_postinit(void);
-/* $OpenBSD: pmap.h,v 1.20 2023/04/13 15:23:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.21 2023/12/11 22:12:53 kettenis Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
extern struct pmap __pmap_kernel;
void pmap_bootstrap(void);
+#define pmap_init_percpu() do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
#define pmap_kernel() (&__pmap_kernel)
#define pmap_update(pm) /* nothing (yet) */
#define pmap_proc_iflush(p,va,len) /* nothing */
+#define pmap_init_percpu() do { /* nothing */ } while (0)
void pmap_bootstrap(u_long, u_long, u_int, u_int);
int pmap_copyinsn(pmap_t, vaddr_t, uint32_t *);
-/* $OpenBSD: init_main.c,v 1.322 2023/08/29 16:19:34 claudio Exp $ */
+/* $OpenBSD: init_main.c,v 1.323 2023/12/11 22:12:53 kettenis Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
/* Enable per-CPU data. */
mbcpuinit();
kqueue_init_percpu();
+ pmap_init_percpu();
uvm_init_percpu();
evcount_init_percpu();