From: Thomas Gleixner <tglx@linutronix.de>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: linux-iio@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@arm.linux.org.uk>,
Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 13/21] arm: irq: export set flags
Date: Thu, 31 Mar 2011 17:48:48 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1103311735580.22418@localhost6.localdomain6> (raw)
In-Reply-To: <1301583255-28468-14-git-send-email-jic23@cam.ac.uk>
On Thu, 31 Mar 2011, Jonathan Cameron wrote:
> ---
> arch/arm/kernel/irq.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
> index 3535d37..e4fd9e4 100644
> --- a/arch/arm/kernel/irq.c
> +++ b/arch/arm/kernel/irq.c
> @@ -163,6 +163,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
> desc->status &= ~IRQ_NOAUTOEN;
> raw_spin_unlock_irqrestore(&desc->lock, flags);
> }
> +EXPORT_SYMBOL(set_irq_flags);
For one it would be EXPORT_SYMBOL_GPL, but that code has changed, so
the patch wont apply. Please make sure your patches apply to latest
linus git next time.
So the code looks like this now.
void set_irq_flags(unsigned int irq, unsigned int iflags)
{
unsigned long clr = 0, set = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
if (irq >= nr_irqs) {
printk(KERN_ERR "Trying to set irq flags for IRQ%d\n", irq);
return;
}
if (iflags & IRQF_VALID)
clr |= IRQ_NOREQUEST;
if (iflags & IRQF_PROBE)
clr |= IRQ_NOPROBE;
if (!(iflags & IRQF_NOAUTOEN))
clr |= IRQ_NOAUTOEN;
/* Order is clear bits in "clr" then set bits in "set" */
irq_modify_status(irq, clr, set & ~clr);
}
There are tons of drivers which use it under an ARM ifdef. That's
really silly. The flags are in 100% of the cases constants, so if we
remove the irq_nr check, then the compiler can optimize that code down
to
irq_modify_status(irq, X, Y);
So we have two options here to solve that.
Use coccinelle and sweep the whole tree and convert it to
irq_modify_status(irq, X, Y);
calls or move that set_irq_flags() stuff as an inline helper (minus
the printk) - the core code does the irq validity check already - into
linux/interrupt.h and clean up all the ifdef ARM stuff in drivers/*
I'd vote for the first one, but I have no real objection against the
second solution.
Russell ??
Thanks,
tglx
next prev parent reply other threads:[~2011-03-31 15:48 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 14:53 [RFC PATCH 00/21] IIO: Channel registration rework, buffer chardev combining and rewrite of triggers as 'virtual' irq_chips Jonathan Cameron
2011-03-31 14:53 ` [PATCH 01/21] staging:iio: allow channels to be set up using a table of iio_channel_spec structures Jonathan Cameron
2011-03-31 14:53 ` [PATCH 02/21] staging:iio:lis3l02dq - experimental move to new channel_spec approach Jonathan Cameron
2011-03-31 14:53 ` [PATCH 03/21] staging:iio:max1363 - experimental move to channel_spec registration Jonathan Cameron
2011-03-31 14:53 ` [PATCH 04/21] staging:iio: remove ability to escalate events Jonathan Cameron
2011-03-31 14:53 ` [PATCH 05/21] staging:iio: Add polling of events on the ring access chrdev Jonathan Cameron
2011-03-31 14:54 ` [PATCH 06/21] staging:iio: remove legacy event chrdev for the buffers Jonathan Cameron
2011-03-31 14:54 ` [PATCH 07/21] staging:iio: Buffer device flattening Jonathan Cameron
2011-03-31 14:54 ` [PATCH 08/21] staging:iio:lis3l02dq: General cleanup Jonathan Cameron
2011-03-31 14:54 ` [PATCH 09/21] staging:iio: Push interrupt setup down into the drivers for event lines Jonathan Cameron
2011-03-31 14:54 ` [PATCH 10/21] staging:iio: lis3l02dq - separate entirely interrupt handling for thesholds from that for the datardy signal Jonathan Cameron
2011-03-31 14:54 ` [PATCH 11/21] staging:iio: Remove legacy event handling Jonathan Cameron
2011-03-31 14:54 ` [PATCH 12/21] staging:iio:lis3l02dq make threshold interrupt threaded Jonathan Cameron
2011-03-31 14:54 ` [PATCH 13/21] arm: irq: export set flags Jonathan Cameron
2011-03-31 15:48 ` Thomas Gleixner [this message]
2011-03-31 14:54 ` [PATCH 14/21] irq: export handle_simple_irq and irq_to_desc to allow for virtual irqs in IIO Jonathan Cameron
2011-03-31 14:54 ` [PATCH 15/21] staging:iio: Add infrastructure for irq_chip based triggers Jonathan Cameron
2011-04-02 18:34 ` Jonathan Cameron
2011-03-31 14:54 ` [PATCH 16/21] stargate2 - add an IIO interrupt pool Jonathan Cameron
2011-03-31 14:54 ` [PATCH 17/21] staging:iio:Documentation generic_buffer.c update to new abi for buffers Jonathan Cameron
2011-03-31 14:54 ` [PATCH 18/21] staging:iio:ring_sw add function needed for threaded irq Jonathan Cameron
2011-03-31 14:54 ` [PATCH 19/21] staging:iio:lis3l02dq move to threaded trigger handling Jonathan Cameron
2011-03-31 14:54 ` [PATCH 20/21] staging:iio:trigger remove legacy pollfunc elements Jonathan Cameron
2011-03-31 14:54 ` [PATCH 21/21] staging:iio: rip out scan_el attributes. Now handled as iio_dev_attrs like everything else Jonathan Cameron
2011-03-31 15:28 ` [RFC PATCH 00/21] IIO: Channel registration rework, buffer chardev combining and rewrite of triggers as 'virtual' irq_chips Arnd Bergmann
2011-04-04 12:02 ` Michael Hennerich
2011-04-04 13:17 ` Jonathan Cameron
2011-04-04 13:26 ` Jonathan Cameron
2011-04-04 14:44 ` Michael Hennerich
2011-04-04 18:09 ` Jonathan Cameron
2011-04-04 14:49 ` Arnd Bergmann
2011-04-04 17:51 ` Jonathan Cameron
2011-04-11 18:38 ` Jonathan Cameron
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=alpine.LFD.2.00.1103311735580.22418@localhost6.localdomain6 \
--to=tglx@linutronix.de \
--cc=arnd@arndb.de \
--cc=jic23@cam.ac.uk \
--cc=lethal@linux-sh.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®