-/* $OpenBSD: pmap.h,v 1.64 2018/02/21 19:24:15 guenther Exp $ */
+/* $OpenBSD: pmap.h,v 1.65 2018/02/26 03:12:41 guenther Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
#ifndef _LOCORE
#ifdef _KERNEL
#include <machine/cpufunc.h>
-#include <machine/segments.h>
#endif /* _KERNEL */
#include <sys/mutex.h>
#include <uvm/uvm_object.h>
#define pmap_clear_modify(pg) pmap_clear_attrs(pg, PG_M)
#define pmap_clear_reference(pg) pmap_clear_attrs(pg, PG_U)
-#define pmap_copy(DP,SP,D,L,S)
+#define pmap_copy(DP,SP,D,L,S)
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
-#define pmap_move(DP,SP,D,L,S)
+#define pmap_move(DP,SP,D,L,S)
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
#define pmap_proc_iflush(p,va,len) /* nothing */
void pmap_remove(struct pmap *, vaddr_t, vaddr_t);
boolean_t pmap_test_attrs(struct vm_page *, unsigned);
static void pmap_update_pg(vaddr_t);
-static void pmap_update_2pg(vaddr_t,vaddr_t);
void pmap_write_protect(struct pmap *, vaddr_t,
vaddr_t, vm_prot_t);
void pmap_fix_ept(struct pmap *, vaddr_t);
int pmap_convert(struct pmap *, int);
void pmap_enter_special(vaddr_t, paddr_t, vm_prot_t);
-/*
+/*
* functions for flushing the cache for vaddrs and pages.
* these functions are not part of the MI pmap interface and thus
* should not be used as such.
* inline functions
*/
-static __inline void
+static inline void
pmap_remove_all(struct pmap *pmap)
{
/* Nothing. */
* if hardware doesn't support one-page flushing)
*/
-__inline static void
+inline static void
pmap_update_pg(vaddr_t va)
{
invlpg(va);
}
-/*
- * pmap_update_2pg: flush two pages from the TLB
- */
-
-__inline static void
-pmap_update_2pg(vaddr_t va, vaddr_t vb)
-{
- invlpg(va);
- invlpg(vb);
-}
-
/*
* pmap_page_protect: change the protection of all recorded mappings
* of a managed page
* unprotecting a page is done on-demand at fault time.
*/
-__inline static void
+inline static void
pmap_page_protect(struct vm_page *pg, vm_prot_t prot)
{
if ((prot & PROT_WRITE) == 0) {
* unprotecting a page is done on-demand at fault time.
*/
-__inline static void
+inline static void
pmap_protect(struct pmap *pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot)
{
if ((prot & PROT_WRITE) == 0) {
* kvtopte: return a pointer to the PTE mapping a kernel VA
*/
-static __inline pt_entry_t *
+static inline pt_entry_t *
vtopte(vaddr_t va)
{
return (PTE_BASE + pl1_i(va));
}
-static __inline pt_entry_t *
+static inline pt_entry_t *
kvtopte(vaddr_t va)
{
#ifdef LARGEPAGES