Implement and enable TOPDOWN_VM. From Chuck Silvers.
This commit is contained in:
parent
dd3e806542
commit
9c098a4b96
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.h,v 1.57 2013/12/27 21:11:19 palle Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.58 2014/04/14 10:54:08 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -192,8 +192,27 @@ int pmap_count_wired(struct pmap *);
|
|||
void pmap_activate_pmap(struct pmap *);
|
||||
void pmap_update(struct pmap *);
|
||||
void pmap_bootstrap(u_long, u_long);
|
||||
|
||||
/* make sure all page mappings are modulo 16K to prevent d$ aliasing */
|
||||
#define PMAP_PREFER(pa, va, sz, td) (*(va)+=(((*(va))^(pa))&(1<<(PGSHIFT))))
|
||||
#define PMAP_PREFER(fo, va, sz, td) pmap_prefer((fo), (va), (td))
|
||||
static inline void
|
||||
pmap_prefer(vaddr_t fo, vaddr_t *va, int td)
|
||||
{
|
||||
vaddr_t newva;
|
||||
vaddr_t m;
|
||||
|
||||
m = 2 * PAGE_SIZE;
|
||||
newva = (*va & ~(m - 1)) | (fo & (m - 1));
|
||||
|
||||
if (td) {
|
||||
if (newva > *va)
|
||||
newva -= m;
|
||||
} else {
|
||||
if (newva < *va)
|
||||
newva += m;
|
||||
}
|
||||
*va = newva;
|
||||
}
|
||||
|
||||
#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */
|
||||
#define PMAP_NEED_PROCWR
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.33 2013/01/03 09:40:55 martin Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.34 2014/04/14 10:54:08 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -47,6 +47,8 @@
|
|||
#ifndef VMPARAM_H
|
||||
#define VMPARAM_H
|
||||
|
||||
#define __USE_TOPDOWN_VM
|
||||
|
||||
/*
|
||||
* We use 8K VM pages on the Sun4U. Override the PAGE_* definitions
|
||||
* to be compile-time constants.
|
||||
|
|
Loading…
Reference in New Issue