Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jul 2014 22:06:32 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r268184 - in stable/10/sys/ia64: ia64 include
Message-ID:  <201407022206.s62M6WAm021812@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Wed Jul  2 22:06:31 2014
New Revision: 268184
URL: http://svnweb.freebsd.org/changeset/base/268184

Log:
  MFC r257477: Purge the translation cache of APs before we unleash them.

Modified:
  stable/10/sys/ia64/ia64/mp_machdep.c
  stable/10/sys/ia64/ia64/pmap.c
  stable/10/sys/ia64/include/pmap.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ia64/ia64/mp_machdep.c
==============================================================================
--- stable/10/sys/ia64/ia64/mp_machdep.c	Wed Jul  2 22:04:14 2014	(r268183)
+++ stable/10/sys/ia64/ia64/mp_machdep.c	Wed Jul  2 22:06:31 2014	(r268184)
@@ -240,6 +240,8 @@ ia64_ap_startup(void)
 	KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
 	PCPU_SET(curthread, PCPU_GET(idlethread));
 
+	pmap_invalidate_all();
+
 	atomic_add_int(&ia64_ap_state.as_awake, 1);
 	while (!smp_started)
 		cpu_spinwait();

Modified: stable/10/sys/ia64/ia64/pmap.c
==============================================================================
--- stable/10/sys/ia64/ia64/pmap.c	Wed Jul  2 22:04:14 2014	(r268183)
+++ stable/10/sys/ia64/ia64/pmap.c	Wed Jul  2 22:06:31 2014	(r268184)
@@ -262,7 +262,6 @@ static vm_page_t pmap_pv_reclaim(pmap_t 
 static void	pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va,
 		    vm_page_t m, vm_prot_t prot);
 static void	pmap_free_pte(struct ia64_lpte *pte, vm_offset_t va);
-static void	pmap_invalidate_all(void);
 static int	pmap_remove_pte(pmap_t pmap, struct ia64_lpte *pte,
 		    vm_offset_t va, pv_entry_t pv, int freepte);
 static int	pmap_remove_vhpt(vm_offset_t va);
@@ -537,13 +536,12 @@ pmap_invalidate_page(vm_offset_t va)
 	critical_exit();
 }
 
-static void
-pmap_invalidate_all_1(void *arg)
+void
+pmap_invalidate_all(void)
 {
 	uint64_t addr;
 	int i, j;
 
-	critical_enter();
 	addr = pmap_ptc_e_base;
 	for (i = 0; i < pmap_ptc_e_count1; i++) {
 		for (j = 0; j < pmap_ptc_e_count2; j++) {
@@ -552,20 +550,7 @@ pmap_invalidate_all_1(void *arg)
 		}
 		addr += pmap_ptc_e_stride1;
 	}
-	critical_exit();
-}
-
-static void
-pmap_invalidate_all(void)
-{
-
-#ifdef SMP
-	if (mp_ncpus > 1) {
-		smp_rendezvous(NULL, pmap_invalidate_all_1, NULL, NULL);
-		return;
-	}
-#endif
-	pmap_invalidate_all_1(NULL);
+	ia64_srlz_i();
 }
 
 static uint32_t

Modified: stable/10/sys/ia64/include/pmap.h
==============================================================================
--- stable/10/sys/ia64/include/pmap.h	Wed Jul  2 22:04:14 2014	(r268183)
+++ stable/10/sys/ia64/include/pmap.h	Wed Jul  2 22:06:31 2014	(r268184)
@@ -122,6 +122,7 @@ extern int pmap_vhpt_log2size;
 
 vm_offset_t pmap_alloc_vhpt(void);
 void	pmap_bootstrap(void);
+void	pmap_invalidate_all(void);
 void	pmap_kenter(vm_offset_t va, vm_offset_t pa);
 vm_paddr_t pmap_kextract(vm_offset_t va);
 void	pmap_kremove(vm_offset_t);



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