From 6da4e60a23f8f4283bcad18322c7a6c2bdf0dfe8 Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Thu, 21 Mar 2002 13:07:31 +0000 Subject: [PATCH] - Make all inlines for manipulating supervisor-level registers accept/return register_t values. - Implement an inline for isync. --- sys/powerpc/include/cpufunc.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 1fabff730862..7ea27b03b1e3 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) {