Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jul 2015 20:47:28 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286040 - in head/sys: arm/arm i386/i386 mips/mips
Message-ID:  <201507292047.t6TKlSOr031031@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Wed Jul 29 20:47:27 2015
New Revision: 286040
URL: https://svnweb.freebsd.org/changeset/base/286040

Log:
  Remove dead functions pmap_pvdump and pads.
  
  Differential Revision:	D3206
  Submitted by:	kevin.bowling@kev009.com
  Reviewed by:	alc

Modified:
  head/sys/arm/arm/pmap-v6-new.c
  head/sys/i386/i386/pmap.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/arm/arm/pmap-v6-new.c
==============================================================================
--- head/sys/arm/arm/pmap-v6-new.c	Wed Jul 29 20:17:29 2015	(r286039)
+++ head/sys/arm/arm/pmap-v6-new.c	Wed Jul 29 20:47:27 2015	(r286040)
@@ -162,7 +162,6 @@ __FBSDID("$FreeBSD$");
 static void pmap_zero_page_check(vm_page_t m);
 void pmap_debug(int level);
 int pmap_pid_dump(int pid);
-void pmap_pvdump(vm_paddr_t pa);
 
 #define PDEBUG(_lev_,_stat_) \
 	if (pmap_debug_level >= (_lev_)) \
@@ -6345,62 +6344,6 @@ pmap_pid_dump(int pid)
 	return (npte2);
 }
 
-/*
- *  Print address space of pmap.
- */
-static void
-pads(pmap_t pmap)
-{
-	int i, j;
-	vm_paddr_t va;
-	pt1_entry_t pte1;
-	pt2_entry_t *pte2p, pte2;
-
-	if (pmap == kernel_pmap)
-		return;
-	for (i = 0; i < NPTE1_IN_PT1; i++) {
-		pte1 = pte1_load(&pmap->pm_pt1[i]);
-		if (pte1_is_section(pte1)) {
-			/*
-			 * QQQ: Do something here!
-			 */
-		} else if (pte1_is_link(pte1)) {
-			for (j = 0; j < NPTE2_IN_PT2; j++) {
-				va = (i << PTE1_SHIFT) + (j << PAGE_SHIFT);
-				if (pmap == kernel_pmap && va < KERNBASE)
-					continue;
-				if (pmap != kernel_pmap && va >= KERNBASE &&
-				    (va < UPT2V_MIN_ADDRESS ||
-				    va >= UPT2V_MAX_ADDRESS))
-					continue;
-
-				pte2p = pmap_pte2(pmap, va);
-				pte2 = pte2_load(pte2p);
-				pmap_pte2_release(pte2p);
-				if (!pte2_is_valid(pte2))
-					continue;
-				printf("%x:%x ", va, pte2);
-			}
-		}
-	}
-}
-
-void
-pmap_pvdump(vm_paddr_t pa)
-{
-	pv_entry_t pv;
-	pmap_t pmap;
-	vm_page_t m;
-
-	printf("pa %x", pa);
-	m = PHYS_TO_VM_PAGE(pa);
-	TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) {
-		pmap = PV_PMAP(pv);
-		printf(" -> pmap %p, va %x", (void *)pmap, pv->pv_va);
-		pads(pmap);
-	}
-	printf(" ");
-}
 #endif
 
 #ifdef DDB

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Wed Jul 29 20:17:29 2015	(r286039)
+++ head/sys/i386/i386/pmap.c	Wed Jul 29 20:47:27 2015	(r286040)
@@ -5461,51 +5461,3 @@ pmap_pid_dump(int pid)
 	return (npte);
 }
 #endif
-
-#if defined(DEBUG)
-
-static void	pads(pmap_t pm);
-void		pmap_pvdump(vm_paddr_t pa);
-
-/* print address space of pmap*/
-static void
-pads(pmap_t pm)
-{
-	int i, j;
-	vm_paddr_t va;
-	pt_entry_t *ptep;
-
-	if (pm == kernel_pmap)
-		return;
-	for (i = 0; i < NPDEPTD; i++)
-		if (pm->pm_pdir[i])
-			for (j = 0; j < NPTEPG; j++) {
-				va = (i << PDRSHIFT) + (j << PAGE_SHIFT);
-				if (pm == kernel_pmap && va < KERNBASE)
-					continue;
-				if (pm != kernel_pmap && va > UPT_MAX_ADDRESS)
-					continue;
-				ptep = pmap_pte(pm, va);
-				if (pmap_pte_v(ptep))
-					printf("%x:%x ", va, *ptep);
-			};
-
-}
-
-void
-pmap_pvdump(vm_paddr_t pa)
-{
-	pv_entry_t pv;
-	pmap_t pmap;
-	vm_page_t m;
-
-	printf("pa %x", pa);
-	m = PHYS_TO_VM_PAGE(pa);
-	TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) {
-		pmap = PV_PMAP(pv);
-		printf(" -> pmap %p, va %x", (void *)pmap, pv->pv_va);
-		pads(pmap);
-	}
-	printf(" ");
-}
-#endif

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Wed Jul 29 20:17:29 2015	(r286039)
+++ head/sys/mips/mips/pmap.c	Wed Jul 29 20:47:27 2015	(r286040)
@@ -3294,56 +3294,6 @@ DB_SHOW_COMMAND(ptable, ddb_pid_dump)
 }
 #endif
 
-#if defined(DEBUG)
-
-static void pads(pmap_t pm);
-void pmap_pvdump(vm_offset_t pa);
-
-/* print address space of pmap*/
-static void
-pads(pmap_t pm)
-{
-	unsigned va, i, j;
-	pt_entry_t *ptep;
-
-	if (pm == kernel_pmap)
-		return;
-	for (i = 0; i < NPTEPG; i++)
-		if (pm->pm_segtab[i])
-			for (j = 0; j < NPTEPG; j++) {
-				va = (i << SEGSHIFT) + (j << PAGE_SHIFT);
-				if (pm == kernel_pmap && va < KERNBASE)
-					continue;
-				if (pm != kernel_pmap &&
-				    va >= VM_MAXUSER_ADDRESS)
-					continue;
-				ptep = pmap_pte(pm, va);
-				if (pte_test(ptep, PTE_V))
-					printf("%x:%x ", va, *(int *)ptep);
-			}
-
-}
-
-void
-pmap_pvdump(vm_offset_t pa)
-{
-	register pv_entry_t pv;
-	vm_page_t m;
-
-	printf("pa %x", pa);
-	m = PHYS_TO_VM_PAGE(pa);
-	for (pv = TAILQ_FIRST(&m->md.pv_list); pv;
-	    pv = TAILQ_NEXT(pv, pv_list)) {
-		printf(" -> pmap %p, va %x", (void *)pv->pv_pmap, pv->pv_va);
-		pads(pv->pv_pmap);
-	}
-	printf(" ");
-}
-
-/* N/C */
-#endif
-
-
 /*
  * Allocate TLB address space tag (called ASID or TLBPID) and return it.
  * It takes almost as much or more time to search the TLB for a



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