* [PATCH] deprecate cli, sti & friends
@ 2004-11-03 18:46 Christoph Hellwig
2004-11-03 20:35 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2004-11-03 18:46 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
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 <hch@lst.de>
--- 1.33/include/linux/interrupt.h 2004-10-28 09:40:01 +02:00
+++ edited/include/linux/interrupt.h 2004-11-03 19:30:33 +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) local_irq_save(&x)
+#endif /* CONFIG_SMP */
/* SoftIRQ primitives. */
#define local_bh_disable() \
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] deprecate cli, sti & friends
2004-11-03 18:46 [PATCH] deprecate cli, sti & friends Christoph Hellwig
@ 2004-11-03 20:35 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-11-03 20:35 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
On Wed, Nov 03, 2004 at 07:46:25PM +0100, Christoph Hellwig wrote:
> 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 <hch@lst.de>
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 <hch@lst.de>
--- 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() \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-03 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03 18:46 [PATCH] deprecate cli, sti & friends Christoph Hellwig
2004-11-03 20:35 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox