summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/include/pmap.h1
-rw-r--r--sys/mips/mips/pmap.c3
-rw-r--r--sys/mips/mips/uma_machdep.c8
3 files changed, 7 insertions, 5 deletions
diff --git a/sys/mips/include/pmap.h b/sys/mips/include/pmap.h
index 7b5468c..15b07d3 100644
--- a/sys/mips/include/pmap.h
+++ b/sys/mips/include/pmap.h
@@ -179,7 +179,6 @@ void pmap_kenter_temporary_free(vm_paddr_t pa);
void pmap_flush_pvcache(vm_page_t m);
int pmap_emulate_modified(pmap_t pmap, vm_offset_t va);
void pmap_grow_direct_page_cache(void);
-vm_page_t pmap_alloc_direct_page(unsigned int index, int req);
#endif /* _KERNEL */
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c
index 608546e..7925b8c 100644
--- a/sys/mips/mips/pmap.c
+++ b/sys/mips/mips/pmap.c
@@ -163,6 +163,7 @@ static vm_page_t pmap_pv_reclaim(pmap_t locked_pmap);
static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va);
static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap,
vm_offset_t va);
+static vm_page_t pmap_alloc_direct_page(unsigned int index, int req);
static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va,
vm_page_t m, vm_prot_t prot, vm_page_t mpte);
static int pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va,
@@ -1041,7 +1042,7 @@ pmap_grow_direct_page_cache()
#endif
}
-vm_page_t
+static vm_page_t
pmap_alloc_direct_page(unsigned int index, int req)
{
vm_page_t m;
diff --git a/sys/mips/mips/uma_machdep.c b/sys/mips/mips/uma_machdep.c
index 798e632..f1483a9 100644
--- a/sys/mips/mips/uma_machdep.c
+++ b/sys/mips/mips/uma_machdep.c
@@ -50,12 +50,14 @@ uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
*flags = UMA_SLAB_PRIV;
if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT)
- pflags = VM_ALLOC_INTERRUPT;
+ pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED;
else
- pflags = VM_ALLOC_SYSTEM;
+ pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED;
+ if (wait & M_ZERO)
+ pflags |= VM_ALLOC_ZERO;
for (;;) {
- m = pmap_alloc_direct_page(0, pflags);
+ m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, pflags);
if (m == NULL) {
if (wait & M_NOWAIT)
return (NULL);
OpenPOWER on IntegriCloud