summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/system.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /include/asm-sparc/system.h
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'include/asm-sparc/system.h')
-rw-r--r--include/asm-sparc/system.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 01ed7659e..6dc074c78 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -1,4 +1,4 @@
-/* $Id: system.h,v 1.69 1998/04/24 12:30:19 davem Exp $ */
+/* $Id: system.h,v 1.71 1998/10/13 03:51:06 jj Exp $ */
#include <linux/config.h>
#ifndef __SPARC_SYSTEM_H
@@ -151,7 +151,7 @@ extern __inline__ void __cli(void)
__asm__ __volatile__("
rd %%psr, %0
- nop; nop; nop;
+ nop; nop; nop; /* Sun4m + Cypress + SMP bug */
or %0, %1, %0
wr %0, 0x0, %%psr
nop; nop; nop
@@ -166,7 +166,7 @@ extern __inline__ void __sti(void)
__asm__ __volatile__("
rd %%psr, %0
- nop; nop; nop;
+ nop; nop; nop; /* Sun4m + Cypress + SMP bug */
andn %0, %1, %0
wr %0, 0x0, %%psr
nop; nop; nop
@@ -189,7 +189,7 @@ extern __inline__ unsigned long swap_pil(unsigned long __new_psr)
__asm__ __volatile__("
rd %%psr, %0
- nop; nop; nop;
+ nop; nop; nop; /* Sun4m + Cypress + SMP bug */
and %0, %2, %%g1
and %1, %2, %%g2
xorcc %%g1, %%g2, %%g0
@@ -211,7 +211,7 @@ extern __inline__ unsigned long read_psr_and_cli(void)
__asm__ __volatile__("
rd %%psr, %0
- nop; nop; nop;
+ nop; nop; nop; /* Sun4m + Cypress + SMP bug */
or %0, %1, %%g1
wr %%g1, 0x0, %%psr
nop; nop; nop
@@ -235,18 +235,16 @@ extern __inline__ unsigned long read_psr_and_cli(void)
extern unsigned char global_irq_holder;
-#define save_flags(x) \
-do { ((x) = ((global_irq_holder == (unsigned char) smp_processor_id()) ? 1 : \
- ((getipl() & PSR_PIL) ? 2 : 0))); } while(0)
-
#define save_and_cli(flags) do { save_flags(flags); cli(); } while(0)
#ifdef DEBUG_IRQLOCK
extern void __global_cli(void);
extern void __global_sti(void);
+extern unsigned long __global_save_flags(void);
extern void __global_restore_flags(unsigned long flags);
#define cli() __global_cli()
#define sti() __global_sti()
+#define save_flags(flags) ((flags)=__global_save_flags())
#define restore_flags(flags) __global_restore_flags(flags)
#else