diff options
author | benno <benno@FreeBSD.org> | 2002-03-21 13:07:31 +0000 |
---|---|---|
committer | benno <benno@FreeBSD.org> | 2002-03-21 13:07:31 +0000 |
commit | 6932067f77abdb8f67f1d4d9a2bb43eed71767c2 (patch) | |
tree | 3dc371d92e0a461d9df52939ee3f6af4f6806b80 /sys/powerpc | |
parent | 0f9782fc45f1e9e17dde927970c596ed7ba54eb1 (diff) | |
download | FreeBSD-src-6932067f77abdb8f67f1d4d9a2bb43eed71767c2.zip FreeBSD-src-6932067f77abdb8f67f1d4d9a2bb43eed71767c2.tar.gz |
- Make all inlines for manipulating supervisor-level registers accept/return
register_t values.
- Implement an inline for isync.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/include/cpufunc.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 1fabff7..7ea27b0 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -51,16 +51,16 @@ breakpoint(void) /* CPU register mangling inlines */ static __inline void -mtmsr(unsigned int value) +mtmsr(register_t value) { __asm __volatile ("mtmsr %0" :: "r"(value)); } -static __inline unsigned int +static __inline register_t mfmsr(void) { - unsigned int value; + register_t value; __asm __volatile ("mfmsr %0" : "=r"(value)); @@ -68,22 +68,29 @@ mfmsr(void) } static __inline void -mtdec(unsigned int value) +mtdec(register_t value) { __asm __volatile ("mtdec %0" :: "r"(value)); } -static __inline unsigned int +static __inline register_t mfdec(void) { - unsigned int value; + register_t value; __asm __volatile ("mfdec %0" : "=r"(value)); return (value); } +static __inline void +isync(void) +{ + + __asm __volatile ("isync"); +} + static __inline register_t intr_disable(void) { |