Add missing $somearches system.h bits from IDE -ac merge
PATCH 1/1 Add missing $somearches system.h bits from IDE -ac merge
Hi Marcelo,
x86 missing system.h bits got fixed by Changeset 1.793 but this is also missing for the following arches:
- ALPHA, ARM, CRIS, IA64, s390, s390x, sparc, sparc64.
ciao, Marc
include/asm-alpha/system.h +5 -2
@@ -309,9 +309,11 @@#define __sti () do { barrier(); setipl(IPL_MIN); } while(0)#define __save_flags (flags) ((flags) = rdps())#define __save_and_cli (flags) do { (flags) = swpipl(IPL_MAX); barrier(); } while(0) +#define __save_and_sti (flags) do { (flags) = swpipl(IPL_MIN); barrier(); } while(0)#define __restore_flags (flags) do { barrier(); setipl(flags); barrier(); } while(0)#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)#define local_irq_disable () __cli()#define local_irq_enable () __sti()
@@ -320,8 +322,6 @@extern int global_irq_holder; -#define save_and_cli (flags) (save_flags(flags), cli()) -extern void __global_cli (void );extern void __global_sti (void );extern unsigned long __global_save_flags (void );
@@ -331,6 +331,8 @@#define sti () __global_sti()#define save_flags (flags) ((flags) = __global_save_flags())#define restore_flags (flags) __global_restore_flags(flags) +#define save_and_cli (flags) (save_flags(flags), cli()) +#define save_and_sti (flags) (save_flags(flags), sti())#else /* CONFIG_SMP */
@@ -338,6 +340,7 @@#define sti () __sti()#define save_flags (flags) __save_flags(flags)#define save_and_cli (flags) __save_and_cli(flags) +#define save_and_sti (flags) __save_and_sti(flags)#define restore_flags (flags) __restore_flags(flags)#endif /* CONFIG_SMP */
include/asm-arm/system.h +3 -0
@@ -58,6 +58,7 @@/* For spinlocks etc */ #define local_irq_save (x) __save_flags_cli(x) +#define local_irq_set (x) __save_and_sti(x)#define local_irq_restore (x) __restore_flags(x)#define local_irq_disable () __cli()#define local_irq_enable () __sti()
@@ -82,6 +83,8 @@#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x)#define save_flags_cli (x) __save_flags_cli(x) +#define save_and_cli (x) __save_flags_cli(x) +#define save_and_sti (x) __save_flags_sti(x)#endif /* CONFIG_SMP */
include/asm-cris/system.h +3 -1
@@ -69,6 +69,7 @@/* For spinlocks etc */ #define local_irq_save (x) __asm__ __volatile__ ("move $ccr,%0\n\tdi" : "=rm" (x) : : "memory"); +#define local_irq_set (x) __asm__ __volatile__ ("move $ccr,%0\n\tei" : "=rm" (x) : : "memory");#define local_irq_restore (x) restore_flags(x)#define local_irq_disable () cli()
@@ -80,7 +81,8 @@#define sti () __sti()#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x) -#define save_and_cli (x) do { __save_flags(x); cli(); } while(0) +#define save_and_cli (x) do { save_flags(x); cli(); } while(0) +#define save_and_sti (x) do { save_flags(x); sti(); } while(0)static inline unsigned long __xchg (unsigned long x,void * ptr,int size) {
include/asm-ia64/system.h +9 -0
@@ -171,6 +171,15 @@ : "p6", "p7", "memory")#endif /* !CONFIG_IA64_DEBUG_IRQ */ +#error andre hedrick screwed this up please help unscrew in order to clean up +/* +* __save_and_sti(x) == __save_flags(x); ide__sti(); +* __save_flags(x); __sti(); +* +* local_irq_set(x) == __save_and_sti(x) +*/ + +#define local_irq_enable () __asm__ __volatile__ (";; ssm psr.i;; srlz.d" ::: "memory")#define __cli () local_irq_disable ()
include/asm-s390/system.h +8 -0
@@ -206,8 +206,12 @@ : "cc", "0", "1", "2"); \ }) +#define __save_and_cli (x) do { __save_flags(x); __cli(); } while(0); +#define __save_and_sti (x) do { __save_flags(x); __sti(); } while(0); +/* For spinlocks etc */ #define local_irq_save (x) ((x) = __cli()) +#define local_irq_set (x) __save_and_sti(x)#define local_irq_restore (x) __restore_flags(x)#define local_irq_disable () __cli()#define local_irq_enable () __sti()
@@ -223,6 +227,8 @@#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(x); cli(); } while(0); +#define save_and_sti (x) do { save_flags(x); sti(); } while(0);extern void smp_ctl_set_bit (int cr,int bit);extern void smp_ctl_clear_bit (int cr,int bit);
@@ -235,6 +241,8 @@#define sti () __sti()#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x) +#define save_and_cli (x) __save_and_cli(x) +#define save_and_sti (x) __save_and_sti(x)#define ctl_set_bit (cr, bit) __ctl_set_bit(cr, bit)#define ctl_clear_bit (cr, bit) __ctl_clear_bit(cr, bit)
include/asm-s390x/system.h +9 -0
@@ -216,8 +216,13 @@ : "cc", "0", "1", "2"); \ }) + +#define __save_and_cli (x) do { __save_flags(x); __cli(); } while(0); +#define __save_and_sti (x) do { __save_flags(x); __sti(); } while(0); +/* For spinlocks etc */ #define local_irq_save (x) ((x) = __cli()) +#define local_irq_set (x) __save_and_sti(x)#define local_irq_restore (x) __restore_flags(x)#define local_irq_disable () __cli()#define local_irq_enable () __sti()
@@ -233,6 +238,8 @@#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(x); cli(); } while(0); +#define save_and_sti (x) do { save_flags(x); sti(); } while(0);extern void smp_ctl_set_bit (int cr,int bit);extern void smp_ctl_clear_bit (int cr,int bit);
@@ -245,6 +252,8 @@#define sti () __sti()#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x) +#define save_and_cli (x) __save_and_cli(x) +#define save_and_sti (x) __save_and_sti(x)#define ctl_set_bit (cr, bit) __ctl_set_bit(cr, bit)#define ctl_clear_bit (cr, bit) __ctl_clear_bit(cr, bit)
include/asm-sparc/system.h +5 -2
@@ -241,20 +241,21 @@return retval; } +#define __save_and_sti (flags) do { __save_flags(flags); __sti(); } while(0); +#define __save_flags (flags) ((flags) = getipl())#define __save_and_cli (flags) ((flags) = read_psr_and_cli())#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)#ifdef CONFIG_SMP extern unsigned char global_irq_holder; -#define save_and_cli (flags) do { save_flags(flags); cli(); } while(0) -extern void __global_cli (void );extern void __global_sti (void );extern unsigned long __global_save_flags (void );
@@ -263,6 +264,7 @@#define sti () __global_sti()#define save_flags (flags) ((flags)=__global_save_flags())#define restore_flags (flags) __global_restore_flags(flags) +#define save_and_sti (flags) do { save_flags(flags); sti(); } while(0);#else
@@ -271,6 +273,7 @@#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x)#define save_and_cli (x) __save_and_cli(x) +#define save_and_sti (x) __save_and_sti(x)#endif
include/asm-sparc64/system.h +6 -0
@@ -65,9 +65,13 @@#define __save_flags (flags) ((flags) = getipl())#define __save_and_cli (flags) ((flags) = read_pil_and_cli())#define __restore_flags (flags) setipl((flags)) + +#define __save_and_sti (flags) ({ __save_flags(flags); __sti(); }) +#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
@@ -76,6 +80,7 @@#define save_flags (x) __save_flags(x)#define restore_flags (x) __restore_flags(x)#define save_and_cli (x) __save_and_cli(x) +#define save_and_sti (x) __save_and_sti(x)#else #ifndef __ASSEMBLY__
@@ -90,6 +95,7 @@#define save_flags (x) ((x) = __global_save_flags())#define restore_flags (flags) __global_restore_flags(flags)#define save_and_cli (flags) do { save_flags(flags); cli(); } while(0) +#define save_and_sti (flags) do { save_flags(flags); sti(); } while(0)#endif