From owner-svn-src-all@FreeBSD.ORG Sat May 14 14:36:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7F241065673; Sat, 14 May 2011 14:36:08 +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 C85A68FC0A; Sat, 14 May 2011 14:36:08 +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 p4EEa8CV006150; Sat, 14 May 2011 14:36:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4EEa8Tt006148; Sat, 14 May 2011 14:36:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201105141436.p4EEa8Tt006148@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 14 May 2011 14:36:08 +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: r221889 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2011 14:36:08 -0000 Author: marcel Date: Sat May 14 14:36:08 2011 New Revision: 221889 URL: http://svn.freebsd.org/changeset/base/221889 Log: Turn ia64_srlz() and ia64_srlz_i() into defines so that the code is still correct when inlining is disabled. Modified: head/sys/ia64/include/ia64_cpu.h Modified: head/sys/ia64/include/ia64_cpu.h ============================================================================== --- head/sys/ia64/include/ia64_cpu.h Sat May 14 14:25:15 2011 (r221888) +++ head/sys/ia64/include/ia64_cpu.h Sat May 14 14:36:08 2011 (r221889) @@ -508,17 +508,14 @@ ia64_enable_highfp(void) __asm __volatile("rsm psr.dfh;; srlz.d"); } -static __inline void -ia64_srlz_d(void) -{ - __asm __volatile("srlz.d"); -} - -static __inline void -ia64_srlz_i(void) -{ - __asm __volatile("srlz.i;;"); -} +/* + * Avoid inline functions for the following so that they still work + * correctly when inlining is not enabled (e.g. -O0). Function calls + * need data serialization after setting psr, which results in a + * hazard. + */ +#define ia64_srlz_d() __asm __volatile("srlz.d") +#define ia64_srlz_i() __asm __volatile("srlz.i;;") #endif /* !LOCORE */