X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-m32r%2Fsystem.h;h=5828af7d412203f910188716c7374b9b717787f8;hb=20fcd31c96d8a7938e49ec2bc2249a5256b1ab2f;hp=cca922a0b7cbeeea97463aa6142cab38e4c9da5d;hpb=1a69f36a78895dad9a6b97ffa2d6d2b7c3975b5d;p=linux-2.6.git diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index cca922a0b..5828af7d4 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h @@ -7,6 +7,7 @@ * for more details. * * Copyright (C) 2001 by Hiroyuki Kondo, Hirokazu Takata, and Hitoshi Yamamoto + * Copyright (C) 2004 Hirokazu Takata */ #include @@ -73,7 +74,7 @@ #define local_irq_disable() \ __asm__ __volatile__ ("clrpsw #0x40 -> nop": : :"memory") #else /* CONFIG_CHIP_M32102 */ -static __inline__ void local_irq_enable(void) +static inline void local_irq_enable(void) { unsigned long tmpreg; __asm__ __volatile__( @@ -83,7 +84,7 @@ static __inline__ void local_irq_enable(void) : "=&r" (tmpreg) : : "cbit", "memory"); } -static __inline__ void local_irq_disable(void) +static inline void local_irq_disable(void) { unsigned long tmpreg0, tmpreg1; __asm__ __volatile__( @@ -219,11 +220,7 @@ static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, * rmb() prevents loads being reordered across this point. * wmb() prevents stores being reordered across this point. */ -#if 0 -#define mb() __asm__ __volatile__ ("push r0; \n\t pop r0;" : : : "memory") -#else -#define mb() __asm__ __volatile__ ("" : : : "memory") -#endif +#define mb() barrier() #define rmb() mb() #define wmb() mb() @@ -298,4 +295,3 @@ static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, #define set_wmb(var, value) do { var = value; wmb(); } while (0) #endif /* _ASM_M32R_SYSTEM_H */ -