Re: 2.6.17-mm3: arm: *_irq_wake compile error

From: Andrew Morton
Date: Wed Jun 28 2006 - 03:14:11 EST


On Wed, 28 Jun 2006 09:09:04 +0200
Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:

> On Wed, 2006-06-28 at 00:40 +0200, Adrian Bunk wrote:
> > genirq-add-irq-wake-power-management-support.patch causes the following
> > compile error on arm:
> >
> > <-- snip -->
> >
> > ...
> > CC init/main.o
> > In file included from include/linux/rtc.h:102,
> > from include/linux/efi.h:19,
> > from init/main.c:47:
> > include/linux/interrupt.h:108: error: conflicting types for 'enable_irq_wake'
> > include/asm/irq.h:47: error: previous declaration of 'enable_irq_wake' was here
> > include/linux/interrupt.h:113: error: conflicting types for 'disable_irq_wake'
> > include/asm/irq.h:46: error: previous declaration of 'disable_irq_wake' was here
> > make[1]: *** [init/main.o] Error 1
>
> Thats a mismerge with LOCKDEP
>
> This section was originally inside #ifdef CONFIG_GENERIC_HARDIRQS
>
> /* IRQ wakeup (PM) control: */
> extern int set_irq_wake(unsigned int irq, unsigned int on);
>
> static inline int enable_irq_wake(unsigned int irq)
> {
> return set_irq_wake(irq, 1);
> }
>
> static inline int disable_irq_wake(unsigned int irq)
> {
> return set_irq_wake(irq, 0);
> }
>
> The patch is:
>
> lockdep-add-disable-enable_irq_lockdep-api.patch
>

OK, so I moved the above lines inside #ifdef CONFIG_GENERIC_HARDIRQS (diff
did a strange-looking thing with it):

diff -puN include/linux/interrupt.h~lockdep-add-disable-enable_irq_lockdep-api-fix include/linux/interrupt.h
--- a/include/linux/interrupt.h~lockdep-add-disable-enable_irq_lockdep-api-fix
+++ a/include/linux/interrupt.h
@@ -71,17 +71,6 @@ 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

/* IRQ wakeup (PM) control: */
extern int set_irq_wake(unsigned int irq, unsigned int on);
@@ -96,6 +85,18 @@ static inline int disable_irq_wake(unsig
return set_irq_wake(irq, 0);
}

+#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
_

-
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/