deprecate cli, sti & friends
PATCH 1/1 deprecate cli, sti & friends
We provided compat wrappers for !CONFIG_SMP builds for ages, but I think it's time to get the last folks to notice this can't stay so forever..
Signed-off-by Christoph Hellwig <[email protected]>
include/linux/interrupt.h +24 -6
@@ -61,12 +61,30 @@* Temporary defines for UP kernels, until all code gets fixed. */ #ifndef CONFIG_SMP -# define cli () local_irq_disable() -# define sti () local_irq_enable() -# define save_flags (x) local_save_flags(x) -# define restore_flags (x) local_irq_restore(x) -# define save_and_cli (x) local_irq_save(x) -#endif +static inline void __deprecated cli (void ) +{ +local_irq_disable (); +} +static inline void __deprecated sti (void ) +{ +local_irq_enable (); +} +static inline void __deprecated save_flags (unsigned long *x) +{ +local_save_flags (*x); +} +#define save_flags (x) save_flags(&x); +static inline void __deprecated restore_flags (unsigned long x) +{ +local_irq_restore (x); +} + +static inline void __deprecated save_and_cli (unsigned long *x) +{ +local_irq_save (*x); +} +#define save_and_cli (x) local_irq_save(&x) +#endif /* CONFIG_SMP */ /* SoftIRQ primitives. */ #define local_bh_disable () \
Quoted 5 lines · Christoph Hellwig
We provided compat wrappers for !CONFIG_SMP builds for ages, but I think it's time to get the last folks to notice this can't stay so forever..
Signed-off-by Christoph Hellwig <[email protected]>
Mitchell Blank Jr found a small typo, so here's a new version:
--------
We provided compat wrappers for !CONFIG_SMP builds for ages, but I think it's time to get the last folks to notice this can't stay so forever..
Signed-off-by Christoph Hellwig <[email protected]>
include/linux/interrupt.h +24 -6
@@ -61,12 +61,30 @@* Temporary defines for UP kernels, until all code gets fixed. */ #ifndef CONFIG_SMP -# define cli () local_irq_disable() -# define sti () local_irq_enable() -# define save_flags (x) local_save_flags(x) -# define restore_flags (x) local_irq_restore(x) -# define save_and_cli (x) local_irq_save(x) -#endif +static inline void __deprecated cli (void ) +{ +local_irq_disable (); +} +static inline void __deprecated sti (void ) +{ +local_irq_enable (); +} +static inline void __deprecated save_flags (unsigned long *x) +{ +local_save_flags (*x); +} +#define save_flags (x) save_flags(&x); +static inline void __deprecated restore_flags (unsigned long x) +{ +local_irq_restore (x); +} + +static inline void __deprecated save_and_cli (unsigned long *x) +{ +local_irq_save (*x); +} +#define save_and_cli (x) save_and_cli(&x) +#endif /* CONFIG_SMP */ /* SoftIRQ primitives. */ #define local_bh_disable () \