From owner-svn-src-head@FreeBSD.ORG Fri Jun 17 04:26:04 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B1211065672; Fri, 17 Jun 2011 04:26:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D65928FC17; Fri, 17 Jun 2011 04:26:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5H4Q31D059217; Fri, 17 Jun 2011 04:26:03 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5H4Q3MK059214; Fri, 17 Jun 2011 04:26:03 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201106170426.p5H4Q3MK059214@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 17 Jun 2011 04:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223170 - in head/sys/ia64: ia64 include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2011 04:26:04 -0000 Author: marcel Date: Fri Jun 17 04:26:03 2011 New Revision: 223170 URL: http://svn.freebsd.org/changeset/base/223170 Log: Properly serialize the global shootdown with the instruction stream of the local processor. Also explicitly invalidate the ALAT. This is done on the other CPUs in the coherence domain by virtue of the ptc.ga instruction, but does not apply to the local CPU. Modified: head/sys/ia64/ia64/pmap.c head/sys/ia64/include/ia64_cpu.h Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Thu Jun 16 23:40:10 2011 (r223169) +++ head/sys/ia64/ia64/pmap.c Fri Jun 17 04:26:03 2011 (r223170) @@ -559,10 +559,14 @@ pmap_invalidate_page(vm_offset_t va) } while (sem != tag); ia64_ptc_ga(va, PAGE_SHIFT << 2); + ia64_mf(); + ia64_srlz_i(); /* PTC.G leave exclusive */ atomic_store_rel_long(&pmap_ptc_g_sem, 0); + ia64_invala(); + intr_restore(is); critical_exit(); } Modified: head/sys/ia64/include/ia64_cpu.h ============================================================================== --- head/sys/ia64/include/ia64_cpu.h Thu Jun 16 23:40:10 2011 (r223169) +++ head/sys/ia64/include/ia64_cpu.h Fri Jun 17 04:26:03 2011 (r223170) @@ -266,7 +266,7 @@ ia64_ptc_e(uint64_t v) static __inline void ia64_ptc_g(uint64_t va, uint64_t log2size) { - __asm __volatile("ptc.g %0,%1;; srlz.i;;" :: "r"(va), "r"(log2size)); + __asm __volatile("ptc.g %0,%1;;" :: "r"(va), "r"(log2size)); } /* @@ -275,7 +275,7 @@ ia64_ptc_g(uint64_t va, uint64_t log2siz static __inline void ia64_ptc_ga(uint64_t va, uint64_t log2size) { - __asm __volatile("ptc.ga %0,%1;; srlz.i;;" :: "r"(va), "r"(log2size)); + __asm __volatile("ptc.ga %0,%1;;" :: "r"(va), "r"(log2size)); } /* @@ -288,6 +288,15 @@ ia64_ptc_l(uint64_t va, uint64_t log2siz } /* + * Invalidate the ALAT on the local processor. + */ +static __inline void +ia64_invala(void) +{ + __asm __volatile("invala;;"); +} + +/* * Unordered memory load. */