patch-2.4.21 linux-2.4.21/include/asm-sparc64/system.h
Next file: linux-2.4.21/include/asm-sparc64/timer.h
Previous file: linux-2.4.21/include/asm-sparc64/spitfire.h
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-sparc64/system.h
- Orig date:
2002-08-02 17:39:45.000000000 -0700
diff -urN linux-2.4.20/include/asm-sparc64/system.h linux-2.4.21/include/asm-sparc64/system.h
@@ -62,12 +62,23 @@
retval; \
})
+#define read_pil_and_sti() \
+({ unsigned long retval; \
+ __asm__ __volatile__("rdpr %%pil, %0\n\t" \
+ "wrpr 0, %%pil" \
+ : "=r" (retval) \
+ : : "memory"); \
+ retval; \
+})
+
#define __save_flags(flags) ((flags) = getipl())
#define __save_and_cli(flags) ((flags) = read_pil_and_cli())
+#define __save_and_sti(flags) ((flags) = read_pil_and_sti())
#define __restore_flags(flags) setipl((flags))
#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)
#ifndef CONFIG_SMP
@@ -220,10 +231,11 @@
"i" ((const unsigned long)(&((struct task_struct *)0)->thread.flags)),\
"i" ((const unsigned long)(&((struct task_struct *)0)->thread.cwp)), \
"i" (SPARC_FLAG_NEWCHILD) \
- : "cc", "g1", "g2", "g3", "g5", "g7", \
- "l2", "l3", "l4", "l5", "l6", "l7", \
+ : "cc", \
+ "g1", "g2", "g3", "g5", "g7", \
+ "l2", "l3", "l4", "l5", "l6", "l7", \
"i0", "i1", "i2", "i3", "i4", "i5", \
- "o0", "o1", "o2", "o3", "o4", "o5", "o7"); \
+ "o0", "o1", "o2", "o3", "o4", "o5", "o7"); \
/* If you fuck with this, update ret_from_syscall code too. */ \
if (current->thread.flags & SPARC_FLAG_PERFCTR) { \
write_pcr(current->thread.pcr_reg); \
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)