summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-05-14 14:36:08 +0000
committermarcel <marcel@FreeBSD.org>2011-05-14 14:36:08 +0000
commit2619d467b312c60d5de6c953041fc2da2739f365 (patch)
tree07bcd4004c2ef5e54aa872cb40e5451f128a81ba /sys/ia64
parentd8ffb23a02528f8e9bd78fa180e674218c853bf7 (diff)
downloadFreeBSD-src-2619d467b312c60d5de6c953041fc2da2739f365.zip
FreeBSD-src-2619d467b312c60d5de6c953041fc2da2739f365.tar.gz
Turn ia64_srlz() and ia64_srlz_i() into defines so that the code is
still correct when inlining is disabled.
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/include/ia64_cpu.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h
index 92614fc..bb8284d 100644
--- a/sys/ia64/include/ia64_cpu.h
+++ b/sys/ia64/include/ia64_cpu.h
@@ -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 */
OpenPOWER on IntegriCloud