svn commit: r201934 - head/sys/i386/i386

Alan Cox alc at FreeBSD.org
Sat Jan 9 22:09:10 UTC 2010


Author: alc
Date: Sat Jan  9 22:09:10 2010
New Revision: 201934
URL: http://svn.freebsd.org/changeset/base/201934

Log:
  Long ago, in r120654, the rounding of KERNend and physfree in locore
  was changed from a small page boundary to a large page boundary.  As
  a consequence pmap_kmem_choose() became a pointless waste of address
  space.  Eliminate it.

Modified:
  head/sys/i386/i386/pmap.c

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Sat Jan  9 21:57:41 2010	(r201933)
+++ head/sys/i386/i386/pmap.c	Sat Jan  9 22:09:10 2010	(r201934)
@@ -317,7 +317,6 @@ static int _pmap_unwire_pte_hold(pmap_t 
 static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va);
 static void pmap_pte_release(pt_entry_t *pte);
 static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *);
-static vm_offset_t pmap_kmem_choose(vm_offset_t addr);
 #ifdef PAE
 static void *pmap_pdpt_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait);
 #endif
@@ -334,24 +333,6 @@ CTASSERT(1 << PTESHIFT == sizeof(pt_entr
 CTASSERT(KERNBASE % (1 << 24) == 0);
 
 /*
- * Move the kernel virtual free pointer to the next
- * 4MB.  This is used to help improve performance
- * by using a large (4MB) page for much of the kernel
- * (.text, .data, .bss)
- */
-static vm_offset_t
-pmap_kmem_choose(vm_offset_t addr)
-{
-	vm_offset_t newaddr = addr;
-
-#ifndef DISABLE_PSE
-	if (cpu_feature & CPUID_PSE)
-		newaddr = (addr + PDRMASK) & ~PDRMASK;
-#endif
-	return newaddr;
-}
-
-/*
  *	Bootstrap the system enough to run with virtual memory.
  *
  *	On the i386 this is called after mapping has already been enabled
@@ -378,7 +359,6 @@ pmap_bootstrap(vm_paddr_t firstaddr)
 	 * in this calculation.
 	 */
 	virtual_avail = (vm_offset_t) KERNBASE + firstaddr;
-	virtual_avail = pmap_kmem_choose(virtual_avail);
 
 	virtual_end = VM_MAX_KERNEL_ADDRESS;
 


More information about the svn-src-all mailing list