Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 2019 20:11:35 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351487 - head/sys/powerpc/booke
Message-ID:  <201908252011.x7PKBZXh056861@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sun Aug 25 20:11:35 2019
New Revision: 351487
URL: https://svnweb.freebsd.org/changeset/base/351487

Log:
  powerpc/booke: Clean up pmap a little for 64-bit
  
  64-bit Book-E pmap doesn't need copy and zero bounce pages, nor the mutex.
  Don't initialize them or reserve space for them.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==============================================================================
--- head/sys/powerpc/booke/pmap.c	Sun Aug 25 20:08:48 2019	(r351486)
+++ head/sys/powerpc/booke/pmap.c	Sun Aug 25 20:11:35 2019	(r351487)
@@ -161,17 +161,19 @@ static int availmem_regions_sz;
 static struct mem_region *physmem_regions;
 static int physmem_regions_sz;
 
+#ifndef __powerpc64__
 /* Reserved KVA space and mutex for mmu_booke_zero_page. */
 static vm_offset_t zero_page_va;
 static struct mtx zero_page_mutex;
 
-static struct mtx tlbivax_mutex;
-
 /* Reserved KVA space and mutex for mmu_booke_copy_page. */
 static vm_offset_t copy_page_src_va;
 static vm_offset_t copy_page_dst_va;
 static struct mtx copy_page_mutex;
+#endif
 
+static struct mtx tlbivax_mutex;
+
 /**************************************************************************/
 /* PMAP */
 /**************************************************************************/
@@ -1646,6 +1648,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o
 	virtual_avail = round_page(data_end);
 	virtual_end = VM_MAX_KERNEL_ADDRESS;
 
+#ifndef __powerpc64__
 	/* Allocate KVA space for page zero/copy operations. */
 	zero_page_va = virtual_avail;
 	virtual_avail += PAGE_SIZE;
@@ -1661,7 +1664,6 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o
 	mtx_init(&zero_page_mutex, "mmu_booke_zero_page", NULL, MTX_DEF);
 	mtx_init(&copy_page_mutex, "mmu_booke_copy_page", NULL, MTX_DEF);
 
-#ifndef __powerpc64__
 	/* Allocate KVA space for ptbl bufs. */
 	ptbl_buf_pool_vabase = virtual_avail;
 	virtual_avail += PTBL_BUFS * PTBL_PAGES * PAGE_SIZE;
@@ -1820,12 +1822,10 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o
 	/* Initialize (statically allocated) kernel pmap. */
 	/*******************************************************/
 	PMAP_LOCK_INIT(kernel_pmap);
-#ifndef __powerpc64__
-	kptbl_min = VM_MIN_KERNEL_ADDRESS / PDIR_SIZE;
-#endif
 #ifdef __powerpc64__
 	kernel_pmap->pm_pp2d = (pte_t ***)kernel_ptbl_root;
 #else
+	kptbl_min = VM_MIN_KERNEL_ADDRESS / PDIR_SIZE;
 	kernel_pmap->pm_pdir = (pte_t **)kernel_ptbl_root;
 #endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908252011.x7PKBZXh056861>