patch-2.4.21 linux-2.4.21/include/asm-ppc/system.h
Next file: linux-2.4.21/include/asm-ppc/termbits.h
Previous file: linux-2.4.21/include/asm-ppc/string.h
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-ppc/system.h
- Orig date:
2002-08-02 17:39:45.000000000 -0700
diff -urN linux-2.4.20/include/asm-ppc/system.h linux-2.4.21/include/asm-ppc/system.h
@@ -1,7 +1,4 @@
/*
- * BK Id: SCCS/s.system.h 1.20 03/19/02 15:04:39 benh
- */
-/*
* Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
*/
#ifndef __PPC_SYSTEM_H
@@ -105,6 +102,7 @@
#define save_flags(flags) __save_flags(flags)
#define restore_flags(flags) __restore_flags(flags)
#define save_and_cli(flags) __save_and_cli(flags)
+#define save_and_sti(flags) __save_and_sti(flags)
#else /* CONFIG_SMP */
@@ -117,11 +115,15 @@
#define save_flags(x) ((x)=__global_save_flags())
#define restore_flags(x) __global_restore_flags(x)
+#define save_and_cli(x) do { save_flags(x); cli(); } while(0);
+#define save_and_sti(x) do { save_flags(x); sti(); } while(0);
+
#endif /* !CONFIG_SMP */
#define local_irq_disable() __cli()
#define local_irq_enable() __sti()
#define local_irq_save(flags) __save_and_cli(flags)
+#define local_irq_set(flags) __save_and_sti(flags)
#define local_irq_restore(flags) __restore_flags(flags)
static __inline__ unsigned long
@@ -130,8 +132,9 @@
unsigned long prev;
__asm__ __volatile__ ("\n\
-1: lwarx %0,0,%2 \n\
- stwcx. %3,0,%2 \n\
+1: lwarx %0,0,%2 \n"
+ PPC405_ERR77(0,%2)
+" stwcx. %3,0,%2 \n\
bne- 1b"
: "=&r" (prev), "=m" (*(volatile unsigned long *)p)
: "r" (p), "r" (val), "m" (*(volatile unsigned long *)p)
@@ -181,8 +184,9 @@
__asm__ __volatile__ ("\n\
1: lwarx %0,0,%2 \n\
cmpw 0,%0,%3 \n\
- bne 2f \n\
- stwcx. %4,0,%2 \n\
+ bne 2f \n"
+ PPC405_ERR77(0,%2)
+" stwcx. %4,0,%2 \n\
bne- 1b\n"
#ifdef CONFIG_SMP
" sync\n"
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)