From: Sam Ravnborg <sam@ravnborg.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Yinghai Lu <yinghai@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
sparclinux <sparclinux@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: irqnr fallout in gpiolib on sparc32
Date: Mon, 05 Jan 2009 13:48:32 +0000 [thread overview]
Message-ID: <20090105134832.GA14460@uranus.ravnborg.org> (raw)
In-Reply-To: <20090105133819.GE6014@elte.hu>
On Mon, Jan 05, 2009 at 02:38:19PM +0100, Ingo Molnar wrote:
>
> * Sam Ravnborg <sam@ravnborg.org> wrote:
>
> > I hit the following build error on sparc:
> >
> > drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show':
> > drivers/gpio/gpiolib.c:1146: error: implicit declaration of function `irq_to_desc'
> > drivers/gpio/gpiolib.c:1146: warning: initialization makes pointer from integer without a cast
> >
> >
> > This is with an allmodconfig where I did:
> >
> > make ARCH=sparc vmlinux
> >
> > sparc do _not_ have GENERIC_HARDIRQS set to 'y'.
> >
> > I did a simple:
> > #include <linux/irqnr.h> but that did not help.
>
> yeah. Does the patch below do the trick?
Needed a small fix - see below.
>
> btw., i'm curious, does the unification of the sparc architectures mean
> that sparc32 will be using genirq too some time in the future?
Dave has mentioned this but we are not working actively on it yet.
>
> Ingo
>
> ---------------->
> From 08522e214542b4afc6c2401bb02900cfca76f600 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@elte.hu>
> Date: Mon, 5 Jan 2009 14:34:42 +0100
> Subject: [PATCH] genirq: provide irq_to_desc() to non-genirq architectures too
>
> Impact: build fix on non-genirq architectures
>
> Sam Ravnborg reported this build failure on sparc32 allmodconfig,
> the GPIO drivers assume the presence of irq_to_desc():
>
> drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show':
> drivers/gpio/gpiolib.c:1146: error: implicit declaration of function 'irq_to_desc'
>
> Add it in the !genirq case too.
>
> Reported-by: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> include/linux/irqnr.h | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
> index 5504a5c..6b719fa 100644
> --- a/include/linux/irqnr.h
> +++ b/include/linux/irqnr.h
> @@ -8,7 +8,12 @@
>
> #ifndef CONFIG_GENERIC_HARDIRQS
> #include <asm/irq.h>
> -# define nr_irqs NR_IRQS
> +
> +/*
> + * Wrappers for non-genirq architectures:
> + */
> +#define nr_irqs NR_IRQS
> +#define irq_to_desc(irq) irq_desc[irq]
irq_to_desc(irq) return a pointer to a struct irq_desc
so we need to take the address.
> +#define irq_to_desc(irq) &irq_desc[irq]
^
With this small fix the build continues.
Thanks,
Sam
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Yinghai Lu <yinghai@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
sparclinux <sparclinux@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: irqnr fallout in gpiolib on sparc32
Date: Mon, 5 Jan 2009 14:48:32 +0100 [thread overview]
Message-ID: <20090105134832.GA14460@uranus.ravnborg.org> (raw)
In-Reply-To: <20090105133819.GE6014@elte.hu>
On Mon, Jan 05, 2009 at 02:38:19PM +0100, Ingo Molnar wrote:
>
> * Sam Ravnborg <sam@ravnborg.org> wrote:
>
> > I hit the following build error on sparc:
> >
> > drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show':
> > drivers/gpio/gpiolib.c:1146: error: implicit declaration of function `irq_to_desc'
> > drivers/gpio/gpiolib.c:1146: warning: initialization makes pointer from integer without a cast
> >
> >
> > This is with an allmodconfig where I did:
> >
> > make ARCH=sparc vmlinux
> >
> > sparc do _not_ have GENERIC_HARDIRQS set to 'y'.
> >
> > I did a simple:
> > #include <linux/irqnr.h> but that did not help.
>
> yeah. Does the patch below do the trick?
Needed a small fix - see below.
>
> btw., i'm curious, does the unification of the sparc architectures mean
> that sparc32 will be using genirq too some time in the future?
Dave has mentioned this but we are not working actively on it yet.
>
> Ingo
>
> ---------------->
> From 08522e214542b4afc6c2401bb02900cfca76f600 Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@elte.hu>
> Date: Mon, 5 Jan 2009 14:34:42 +0100
> Subject: [PATCH] genirq: provide irq_to_desc() to non-genirq architectures too
>
> Impact: build fix on non-genirq architectures
>
> Sam Ravnborg reported this build failure on sparc32 allmodconfig,
> the GPIO drivers assume the presence of irq_to_desc():
>
> drivers/gpio/gpiolib.c: In function `gpiolib_dbg_show':
> drivers/gpio/gpiolib.c:1146: error: implicit declaration of function 'irq_to_desc'
>
> Add it in the !genirq case too.
>
> Reported-by: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> include/linux/irqnr.h | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
> index 5504a5c..6b719fa 100644
> --- a/include/linux/irqnr.h
> +++ b/include/linux/irqnr.h
> @@ -8,7 +8,12 @@
>
> #ifndef CONFIG_GENERIC_HARDIRQS
> #include <asm/irq.h>
> -# define nr_irqs NR_IRQS
> +
> +/*
> + * Wrappers for non-genirq architectures:
> + */
> +#define nr_irqs NR_IRQS
> +#define irq_to_desc(irq) irq_desc[irq]
irq_to_desc(irq) return a pointer to a struct irq_desc
so we need to take the address.
> +#define irq_to_desc(irq) &irq_desc[irq]
^
With this small fix the build continues.
Thanks,
Sam
next prev parent reply other threads:[~2009-01-05 13:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 13:29 irqnr fallout in gpiolib on sparc32 Sam Ravnborg
2009-01-05 13:29 ` Sam Ravnborg
2009-01-05 13:38 ` Ingo Molnar
2009-01-05 13:38 ` Ingo Molnar
2009-01-05 13:48 ` Sam Ravnborg [this message]
2009-01-05 13:48 ` Sam Ravnborg
2009-01-05 13:55 ` Ingo Molnar
2009-01-05 13:55 ` Ingo Molnar
2009-01-05 20:37 ` David Miller
2009-01-05 20:37 ` David Miller
2009-01-06 12:57 ` Ingo Molnar
2009-01-06 12:57 ` Ingo Molnar
2009-01-06 16:29 ` David Miller
2009-01-06 16:29 ` David Miller
2009-01-07 13:02 ` Ingo Molnar
2009-01-07 13:02 ` Ingo Molnar
2009-01-07 13:34 ` Sam Ravnborg
2009-01-07 13:34 ` Sam Ravnborg
2009-01-07 21:08 ` David Miller
2009-01-07 21:08 ` David Miller
2009-01-06 23:43 ` KOSAKI Motohiro
2009-01-06 23:43 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090105134832.GA14460@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sparclinux@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.