diff options
author | marcel <marcel@FreeBSD.org> | 2011-05-14 14:36:08 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-05-14 14:36:08 +0000 |
commit | 2619d467b312c60d5de6c953041fc2da2739f365 (patch) | |
tree | 07bcd4004c2ef5e54aa872cb40e5451f128a81ba | |
parent | d8ffb23a02528f8e9bd78fa180e674218c853bf7 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | sys/ia64/include/ia64_cpu.h | 19 |
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 */ |