Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2015 16:04:45 +0000 (UTC)
From:      Svatopluk Kraus <skra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r292276 - in head/sys/arm: arm include
Message-ID:  <201512151604.tBFG4j64089708@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: skra
Date: Tue Dec 15 16:04:45 2015
New Revision: 292276
URL: https://svnweb.freebsd.org/changeset/base/292276

Log:
  Local TLB flush is sufficient in pmap_remove_pages().
  
  (1) The pmap argument passed to the function must be current pmap only.
  (2) The process must be single threaded as the function is called either
  when a process is exiting or from exec_new_vmspace().
  
  Remove pmap_tlb_flush_ng() which is not used anywhere now.
  
  Approved by:	kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c
  head/sys/arm/include/pmap-v6.h

Modified: head/sys/arm/arm/pmap-v6-new.c
==============================================================================
--- head/sys/arm/arm/pmap-v6-new.c	Tue Dec 15 16:02:11 2015	(r292275)
+++ head/sys/arm/arm/pmap-v6-new.c	Tue Dec 15 16:04:45 2015	(r292276)
@@ -1380,14 +1380,6 @@ pmap_tlb_flush_range(pmap_t pmap, vm_off
 		tlb_flush_range(sva, size);
 }
 
-PMAP_INLINE void
-pmap_tlb_flush_ng(pmap_t pmap)
-{
-
-	if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active))
-		tlb_flush_all_ng();
-}
-
 /*
  *  Abuse the pte2 nodes for unmapped kva to thread a kva freelist through.
  *  Requirements:
@@ -4233,8 +4225,8 @@ pmap_remove_pages(pmap_t pmap)
 			free_pv_chunk(pc);
 		}
 	}
+	tlb_flush_all_ng_local();
 	sched_unpin();
-	pmap_tlb_flush_ng(pmap);
 	rw_wunlock(&pvh_global_lock);
 	PMAP_UNLOCK(pmap);
 	pmap_free_zero_pages(&free);

Modified: head/sys/arm/include/pmap-v6.h
==============================================================================
--- head/sys/arm/include/pmap-v6.h	Tue Dec 15 16:02:11 2015	(r292275)
+++ head/sys/arm/include/pmap-v6.h	Tue Dec 15 16:04:45 2015	(r292276)
@@ -196,7 +196,6 @@ void pmap_set_pcb_pagedir(pmap_t , struc
 
 void pmap_tlb_flush(pmap_t , vm_offset_t );
 void pmap_tlb_flush_range(pmap_t , vm_offset_t , vm_size_t );
-void pmap_tlb_flush_ng(pmap_t );
 
 void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t );
 



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