summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/system.h
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-03-26 03:56:59 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-03-26 03:56:59 +0000
commit048fea6c1fbbae09d78dd5d81f27437f01edc33e (patch)
treeeeb369fb7f53ac2e3a87f40f6cd6c785e5ca52a4 /include/asm-mips64/system.h
parent4db680f4b269b4a15dccba83a547627b77597b40 (diff)
ip27-irq.c, system.h: implement SMP intr on/off primitives similar to i386.
process.c, smp.c: minor initialization code. SMP compiles still hang at the scsi probing stage, no improvements.
Diffstat (limited to 'include/asm-mips64/system.h')
-rw-r--r--include/asm-mips64/system.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/asm-mips64/system.h b/include/asm-mips64/system.h
index 2d8559aee..e70c6141b 100644
--- a/include/asm-mips64/system.h
+++ b/include/asm-mips64/system.h
@@ -1,4 +1,4 @@
-/* $Id: system.h,v 1.4 1999/12/04 03:59:12 ralf Exp $
+/* $Id: system.h,v 1.5 2000/01/27 07:48:08 kanoj Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -105,14 +105,27 @@ __restore_flags(int flags)
: "$8", "$9", "memory");
}
-/*
- * Non-SMP versions ...
- */
-#define sti() __sti()
+#ifdef __SMP__
+
+extern void __global_cli(void);
+extern void __global_sti(void);
+extern unsigned long __global_save_flags(void);
+extern void __global_restore_flags(unsigned long);
+#define cli() __global_cli()
+#define sti() __global_sti()
+#define save_flags(x) ((x)=__global_save_flags())
+#define restore_flags(x) __global_restore_flags(x)
+#define save_and_cli(x) do { save_flags(flags); cli(); } while(0)
+
+#else
+
#define cli() __cli()
+#define sti() __sti()
#define save_flags(x) __save_flags(x)
-#define save_and_cli(x) __save_and_cli(x)
#define restore_flags(x) __restore_flags(x)
+#define save_and_cli(x) __save_and_cli(x)
+
+#endif /* __SMP__ */
/* For spinlocks etc */
#define local_irq_save(x) __save_and_cli(x);