LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Greg Ungerer <gerg@uclinux.org>
Subject: Re: [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions
Date: Tue, 8 Feb 2011 13:24:35 +1000 [thread overview]
Message-ID: <4D50B773.2070507@snapgear.com> (raw)
In-Reply-To: <20110206233904.777004540@linutronix.de>
Hi Thomas,
On 07/02/11 09:39, Thomas Gleixner wrote:
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
> arch/m68knommu/platform/5272/intc.c | 28 ++++++++++++++++++----------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> Index: linux-next/arch/m68knommu/platform/5272/intc.c
> ===================================================================
> --- linux-next.orig/arch/m68knommu/platform/5272/intc.c
> +++ linux-next/arch/m68knommu/platform/5272/intc.c
> @@ -78,8 +78,10 @@ static struct irqmap intc_irqmap[MCFINT_
> * an interrupt on this irq (for the external irqs). So this mask function
> * is also an ack_mask function.
> */
> -static void intc_irq_mask(unsigned int irq)
> +static void intc_irq_mask(struct irq_data *d)
> {
> + unsigned int irq = d->irq;
> +
> if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
> u32 v;
> irq -= MCFINT_VECBASE;
> @@ -88,8 +90,10 @@ static void intc_irq_mask(unsigned int i
> }
> }
>
> -static void intc_irq_unmask(unsigned int irq)
> +static void intc_irq_unmask(struct irq_data *d)
> {
> + unsigned int irq = d->irq;
> +
> if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
> u32 v;
> irq -= MCFINT_VECBASE;
> @@ -98,8 +102,10 @@ static void intc_irq_unmask(unsigned int
> }
> }
>
> -static void intc_irq_ack(unsigned int irq)
> +static void intc_irq_ack(struct irq_data *d)
> {
> + unsigned int irq = d->irq;
> +
> /* Only external interrupts are acked */
> if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
> irq -= MCFINT_VECBASE;
> @@ -113,8 +119,10 @@ static void intc_irq_ack(unsigned int ir
> }
> }
>
> -static int intc_irq_set_type(unsigned int irq, unsigned int type)
> +static int intc_irq_set_type(struct irq_data *d, unsigned int type)
> {
> + unsigned int irq = d->irq;
> +
> if ((irq >= MCFINT_VECBASE) && (irq <= MCFINT_VECMAX)) {
> irq -= MCFINT_VECBASE;
> if (intc_irqmap[irq].ack) {
> @@ -137,17 +145,17 @@ static int intc_irq_set_type(unsigned in
> */
> static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
> {
> - desc->chip->ack(irq);
> + get_irq_desc_chip(i)->irq_ack(desc->irq_data);
^^^ ^^^
should this be:
get_irq_desc_chip(desc)->irq_ack(&desc->irq_data)
I can't runtime test this right at the moment, but otherwise:
Acked-by: Greg Ungerer <gerg@uclinux.org>
Regards
Greg
> handle_simple_irq(irq, desc);
> }
>
> static struct irq_chip intc_irq_chip = {
> .name = "CF-INTC",
> - .mask = intc_irq_mask,
> - .unmask = intc_irq_unmask,
> - .mask_ack = intc_irq_mask,
> - .ack = intc_irq_ack,
> - .set_type = intc_irq_set_type,
> + .irq_mask = intc_irq_mask,
> + .irq_unmask = intc_irq_unmask,
> + .irq_mask_ack = intc_irq_mask,
> + .irq_ack = intc_irq_ack,
> + .irq_set_type = intc_irq_set_type,
> };
>
> void __init init_IRQ(void)
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
next prev parent reply other threads:[~2011-02-08 3:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 23:39 [patch 00/10] m68knommu: Convert irq_chips and use proper accessor functions Thomas Gleixner
2011-02-06 23:39 ` [patch 01/10] m68knommu: 5772: Replace private irq flow handler Thomas Gleixner
2011-02-08 4:49 ` Greg Ungerer
2011-02-08 4:52 ` Greg Ungerer
2011-02-06 23:39 ` [patch 02/10] m68knommu Convert coldfire intc irq_chip to new functions Thomas Gleixner
2011-02-06 23:39 ` [patch 03/10] m68knommu: Convert coldfire intc-2 " Thomas Gleixner
2011-02-06 23:39 ` [patch 04/10] m68knommu: Convert coldfire intc-simr " Thomas Gleixner
2011-02-06 23:39 ` [patch 05/10] m68knommu: Convert 68328 ints " Thomas Gleixner
2011-02-06 23:39 ` [patch 06/10] m68knommu: Convert 68360 " Thomas Gleixner
2011-02-06 23:39 ` [patch 07/10] m68knommu: Convert 5272 intc " Thomas Gleixner
2011-02-08 3:24 ` Greg Ungerer [this message]
2011-02-08 9:48 ` Thomas Gleixner
2011-02-08 10:03 ` Greg Ungerer
2011-02-06 23:39 ` [patch 08/10] m68knommu Convert 5249 " Thomas Gleixner
2011-02-06 23:39 ` [patch 09/10] m68knommu: Use proper irq_desc accessors in show_interrupts() Thomas Gleixner
2011-02-06 23:39 ` [patch 10/10] m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED 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=4D50B773.2070507@snapgear.com \
--to=gerg@snapgear.com \
--cc=gerg@uclinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--subject='Re: [patch 07/10] m68knommu: Convert 5272 intc irq_chip to new functions' \
/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
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).