patch-2.4.21 linux-2.4.21/include/asm-ppc64/hw_irq.h

Next file: linux-2.4.21/include/asm-ppc64/iSeries/HvCall.h
Previous file: linux-2.4.21/include/asm-ppc64/hvcall.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-ppc64/hw_irq.h linux-2.4.21/include/asm-ppc64/hw_irq.h
@@ -31,11 +31,15 @@
 #define __save_flags(flags)	((flags) = __no_use_save_flags())
 #define __restore_flags(flags)	__no_use_restore_flags((unsigned long)flags)
 #define __save_and_cli(flags)	({__save_flags(flags);__cli();})
+#define __save_and_sti(flags)	({__save_flags(flags);__sti();})
 
 #else
 
 #define __save_flags(flags)	((flags) = mfmsr())
-#define __restore_flags(flags)	mtmsrd(flags)
+#define __restore_flags(flags) do { \
+	__asm__ __volatile__("": : :"memory"); \
+	mtmsrd(flags); \
+} while(0)
 
 static inline void __cli(void)
 {
@@ -63,6 +67,7 @@
 }
 
 #define __save_and_cli(flags)          __do_save_and_cli(&flags)
+#define __save_and_sti(flags)		({__save_flags(flags);__sti();})
 
 #endif /* CONFIG_PPC_ISERIES */
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)