[PATCH] warn about cli, sti & co uses even on UP

From: Christoph Hellwig
Date: Mon Jan 03 2005 - 08:29:35 EST


These don't exist on SMP at all, at least warn on compiling for UP.


--- 1.33/include/linux/interrupt.h 2004-10-28 09:40:01 +02:00
+++ edited/include/linux/interrupt.h 2004-11-03 21:31:02 +01:00
@@ -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() \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/