Date: Sat, 14 May 2011 14:36:08 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221889 - head/sys/ia64/include Message-ID: <201105141436.p4EEa8Tt006148@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105141436.p4EEa8Tt006148>