From 393a225ceda44265d97a8ef76eb455cbfe1bc405 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 12 Feb 2003 04:35:37 +0000 Subject: [PATCH] Remove kptobj. Instead, use VM_ALLOC_NOOBJ. --- sys/amd64/amd64/pmap.c | 11 ++--------- sys/i386/i386/pmap.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 8e73434d93ee..46d8bb530822 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -162,8 +162,6 @@ static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */ static int pgeflag; /* PG_G or-in */ static int pseflag; /* PG_PS or-in */ -static vm_object_t kptobj; - static int nkpt; vm_offset_t kernel_vm_end; extern u_int32_t KERNend; @@ -489,11 +487,6 @@ pmap_init(phys_start, phys_end) int i; int initial_pvs; - /* - * object for kernel page table pages - */ - kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE); - /* * Allocate memory for random pmap data structures. Includes the * pv_head_table. @@ -1580,8 +1573,8 @@ pmap_growkernel(vm_offset_t addr) /* * This index is bogus, but out of the way */ - nkpg = vm_page_alloc(kptobj, nkpt, - VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); + nkpg = vm_page_alloc(NULL, nkpt, + VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); if (!nkpg) panic("pmap_growkernel: no memory to grow kernel"); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 8e73434d93ee..46d8bb530822 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -162,8 +162,6 @@ static boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */ static int pgeflag; /* PG_G or-in */ static int pseflag; /* PG_PS or-in */ -static vm_object_t kptobj; - static int nkpt; vm_offset_t kernel_vm_end; extern u_int32_t KERNend; @@ -489,11 +487,6 @@ pmap_init(phys_start, phys_end) int i; int initial_pvs; - /* - * object for kernel page table pages - */ - kptobj = vm_object_allocate(OBJT_DEFAULT, NKPDE); - /* * Allocate memory for random pmap data structures. Includes the * pv_head_table. @@ -1580,8 +1573,8 @@ pmap_growkernel(vm_offset_t addr) /* * This index is bogus, but out of the way */ - nkpg = vm_page_alloc(kptobj, nkpt, - VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); + nkpg = vm_page_alloc(NULL, nkpt, + VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); if (!nkpg) panic("pmap_growkernel: no memory to grow kernel");