From: Ingo Molnar sparc32 has genirq-incompatible prototypes for the disable/enable_irq() APIs, so the interrupt.h changes broke it. Move the prototypes under the genirq ifdef again, and provide the *_lockdep() APIs as a define, not as an inline function. This should make it work on every non-genirq architecture and the macro is opaque enough to adapt to whatever shape these APIs have on those architectures. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/interrupt.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff -puN include/linux/interrupt.h~lock-validator-fix-sparc32-breakage include/linux/interrupt.h --- devel/include/linux/interrupt.h~lock-validator-fix-sparc32-breakage 2006-06-07 15:23:51.000000000 -0700 +++ devel-akpm/include/linux/interrupt.h 2006-06-07 15:23:51.000000000 -0700 @@ -32,12 +32,11 @@ extern int request_irq(unsigned int, unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); - +#ifdef CONFIG_GENERIC_HARDIRQS extern void disable_irq_nosync(unsigned int irq); extern void disable_irq(unsigned int irq); extern void enable_irq(unsigned int irq); -#ifdef CONFIG_GENERIC_HARDIRQS /* IRQ wakeup (PM) control: */ extern int set_irq_wake(unsigned int irq, unsigned int on); @@ -51,8 +50,6 @@ static inline int disable_irq_wake(unsig return set_irq_wake(irq, 0); } -#endif - /* * Special lockdep variants of irq disabling/enabling. * These should be used for locking constructs that @@ -87,6 +84,18 @@ static inline void enable_irq_lockdep(un #endif enable_irq(irq); } +#else /* !CONFIG_GENERIC_HARDIRQS */ +/* + * NOTE: non-genirq architectures, if they want to support the lock + * validator need to define the methods below in their asm/irq.h + * files, under an #ifdef CONFIG_LOCKDEP section. + */ +# ifndef CONFIG_LOCKDEP +# define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq) +# define disable_irq_lockdep(irq) disable_irq(irq) +# define enable_irq_lockdep(irq) enable_irq(irq) +# endif +#endif /* CONFIG_GENERIC_HARDIRQS */ #ifndef __ARCH_SET_SOFTIRQ_PENDING #define set_softirq_pending(x) (local_softirq_pending() = (x)) _