patch-2.4.5 linux/include/asm-ppc/system.h

Next file: linux/include/asm-ppc/termbits.h
Previous file: linux/include/asm-ppc/string.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.4/linux/include/asm-ppc/system.h linux/include/asm-ppc/system.h
@@ -1,9 +1,9 @@
 /*
- * $Id: system.h,v 1.49 1999/09/11 18:37:54 cort Exp $
- *
+ * BK Id: SCCS/s.system.h 1.10 05/17/01 18:14:26 cort
+ */
+/*
  * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
  */
-#ifdef __KERNEL__
 #ifndef __PPC_SYSTEM_H
 #define __PPC_SYSTEM_H
 
@@ -47,6 +47,7 @@
 #define smp_wmb()	__asm__ __volatile__("": : :"memory")
 #endif /* CONFIG_SMP */
 
+#ifdef __KERNEL__
 extern void xmon_irq(int, void *, struct pt_regs *);
 extern void xmon(struct pt_regs *excp);
 extern void print_backtrace(unsigned long *);
@@ -115,6 +116,8 @@
 #define local_irq_save(flags)		__save_and_cli(flags)
 #define local_irq_restore(flags)	__restore_flags(flags)
 
+#endif /* __KERNEL__ */
+
 #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
 
 static __inline__ unsigned long
@@ -122,9 +125,9 @@
 {
 	unsigned long prev;
 
-	__asm__ __volatile__ ("
-1:	lwarx	%0,0,%2
-	stwcx.	%3,0,%2
+	__asm__ __volatile__ ("\n\
+1:	lwarx	%0,0,%2 \n\
+	stwcx.	%3,0,%2 \n\
 	bne-	1b"
 	: "=&r" (prev), "=m" (*(volatile unsigned long *)p)
 	: "r" (p), "r" (val), "m" (*(volatile unsigned long *)p)
@@ -171,11 +174,11 @@
 {
 	int prev;
 
-	__asm__ __volatile__ ("
-1:	lwarx	%0,0,%2
-	cmpw	0,%0,%3
-	bne	2f
-	stwcx.	%4,0,%2
+	__asm__ __volatile__ ("\n\
+1:	lwarx	%0,0,%2 \n\
+	cmpw	0,%0,%3 \n\
+	bne	2f \n\
+	stwcx.	%4,0,%2 \n\
 	bne-	1b\n"
 #ifdef CONFIG_SMP
 "	sync\n"
@@ -216,4 +219,3 @@
   })
 
 #endif /* __PPC_SYSTEM_H */
-#endif /* __KERNEL__ */

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