From: boris.brezillon@free-electrons.com (Boris Brezillon)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] irqchip: add dumb demultiplexer implementation
Date: Tue, 13 Jan 2015 18:00:17 +0100 [thread overview]
Message-ID: <20150113180017.66efeda7@bbrezillon> (raw)
In-Reply-To: <alpine.DEB.2.11.1501131117120.17382@nanos>
On Tue, 13 Jan 2015 11:38:14 +0100 (CET)
Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > +/**
> > + * handle_dumb_demux_irq - Dumb demuxer irq handle function.
> > + * @irq: the interrupt number
> > + * @desc: the interrupt description structure for this irq
> > + *
> > + * Dumb demux interrupts are sent from a demultiplexing interrupt handler
> > + * which is not able to decide which child interrupt interrupt handler
> > + * should be called.
> > + *
> > + * Note: The caller is expected to handle the ack, clear, mask and
> > + * unmask issues if necessary.
> > + */
> > +irqreturn_t
> > +handle_dumb_demux_irq(unsigned int irq, struct irq_desc *desc)
> > +{
> > + irqreturn_t retval = IRQ_NONE;
> > +
> > + raw_spin_lock(&desc->lock);
> > +
> > + if (!irq_may_run(desc))
> > + goto out_unlock;
> > +
> > + desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
> > + kstat_incr_irqs_this_cpu(irq, desc);
> > +
> > + if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
> > + desc->istate |= IRQS_PENDING;
> > + goto out_unlock;
> > + }
> > +
> > + retval = handle_irq_event_no_spurious_check(desc);
> > +
> > +out_unlock:
> > + raw_spin_unlock(&desc->lock);
> > +
> > + return retval;
> > +}
> > +EXPORT_SYMBOL_GPL(handle_dumb_demux_irq);
>
> This should go into the new file as well, so it gets compiled out when
> not enabled.
Actually, I can't move that function out of kernel/irq/chip.c because
it calls irq_may_run which is statically defined in this file.
Should I export this function or just enclose it in a
#ifdef DUMB_IRQ_DEMUX section ?
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-01-13 17:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 16:15 [PATCH 0/5] ARM: at91: fix irq_pm_install_action WARNING Boris Brezillon
2014-12-15 16:15 ` [PATCH 1/5] genirq: Support mixing IRQF_NO_SUSPEND/IRQF_SUSPEND on shared irqs Boris Brezillon
2014-12-15 21:45 ` Rafael J. Wysocki
2014-12-15 16:15 ` [PATCH 2/5] clk: at91: implement suspend/resume for the PMC irqchip Boris Brezillon
2014-12-15 16:15 ` [PATCH 3/5] watchdog: at91sam9: request the irq with IRQF_NO_SUSPEND Boris Brezillon
2014-12-15 16:15 ` [PATCH 4/5] rtc: at91: request IRQs with IRQF_SUSPEND_NOACTION Boris Brezillon
2014-12-15 16:15 ` [PATCH 5/5] tty: serial: atmel: request IRQ " Boris Brezillon
2014-12-15 22:20 ` [PATCH 0/5] ARM: at91: fix irq_pm_install_action WARNING Rafael J. Wysocki
2014-12-15 22:48 ` Rafael J. Wysocki
2014-12-16 9:07 ` Boris Brezillon
2014-12-16 10:03 ` Thomas Gleixner
2014-12-16 11:25 ` Boris Brezillon
2014-12-16 12:56 ` Thomas Gleixner
2014-12-16 14:20 ` Boris Brezillon
2014-12-16 14:52 ` Thomas Gleixner
2014-12-16 18:26 ` Boris Brezillon
2014-12-16 20:37 ` Thomas Gleixner
2015-01-08 13:52 ` [RFC PATCH] irqchip: add dumb demultiplexer implementation Boris Brezillon
2015-01-13 10:38 ` Thomas Gleixner
2015-01-13 10:58 ` Boris Brezillon
2015-01-13 12:41 ` Thomas Gleixner
2015-01-13 17:00 ` Boris Brezillon [this message]
2015-01-13 17:31 ` Thomas Gleixner
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=20150113180017.66efeda7@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).