All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: balbi@ti.com
Cc: Tony Lindgren <tony@atomide.com>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel Mailing List
	<linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH 1/4] arm: omap: gpio: don't access irq_desc array directly
Date: Wed, 05 Jan 2011 09:11:34 -0800	[thread overview]
Message-ID: <8762u31dix.fsf@ti.com> (raw)
In-Reply-To: <20110105064722.GC2458@legolas.emea.dhcp.ti.com> (Felipe Balbi's message of "Wed, 5 Jan 2011 08:47:22 +0200")

Felipe Balbi <balbi@ti.com> writes:

> On Tue, Jan 04, 2011 at 04:24:58PM -0800, Kevin Hilman wrote:
>> Felipe Balbi <balbi@ti.com> writes:
>> 
>> > Instead of accessing the irq_desc array directly
>> > we can use irq_to_desc(irq). That will allow us to,
>> > if wanted, select SPARSE_IRQ and irq_descs will be
>> > added to a radix tree, instead of a array.
>> >
>> > Signed-off-by: Felipe Balbi <balbi@ti.com>
>> 
>> Can you refresh this one against Tony's omap-for-linus branch. The GPIO
>> omap_device/hwmod conversion changed things around a bit and this patch
>> doesn't apply.
>> 
>> After that, you can send separately, and I'll queue this one along with
>> some other GPIO core fixes for the 2.6.38-rc series after -rc1 comes
>> out.
>
> Sure, it's attached to this mail.

Thanks.  Queueing for 2.6.38-rc

Kevin

>
> From 8d216ccac14e4eebf259d5b40ed2d239248710e1 Mon Sep 17 00:00:00 2001
> From: Felipe Balbi <balbi@ti.com>
> Date: Wed, 5 Jan 2011 08:46:18 +0200
> Subject: [PATCH] arm: omap: gpio: don't access irq_desc array directly
> Organization: Texas Instruments\n
>
> Instead of accessing the irq_desc array directly
> we can use irq_to_desc(irq). That will allow us to,
> if wanted, select SPARSE_IRQ and irq_descs will be
> added to a radix tree, instead of a array.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  arch/arm/plat-omap/gpio.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 1f98e0b..197a6c0 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -756,8 +756,10 @@ static int gpio_irq_type(unsigned irq, unsigned type)
>  	spin_lock_irqsave(&bank->lock, flags);
>  	retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type);
>  	if (retval == 0) {
> -		irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
> -		irq_desc[irq].status |= type;
> +		struct irq_desc *d = irq_to_desc(irq);
> +
> +		d->status &= ~IRQ_TYPE_SENSE_MASK;
> +		d->status |= type;
>  	}
>  	spin_unlock_irqrestore(&bank->lock, flags);
>  
> @@ -1671,7 +1673,9 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank)
>  
>  	for (j = bank->virtual_irq_start;
>  		     j < bank->virtual_irq_start + bank_width; j++) {
> -		lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class);
> +		struct irq_desc *d = irq_to_desc(j);
> +
> +		lockdep_set_class(&d->lock, &gpio_lock_class);
>  		set_irq_chip_data(j, bank);
>  		if (bank_is_mpuio(bank))
>  			set_irq_chip(j, &mpuio_irq_chip);

WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm: omap: gpio: don't access irq_desc array directly
Date: Wed, 05 Jan 2011 09:11:34 -0800	[thread overview]
Message-ID: <8762u31dix.fsf@ti.com> (raw)
In-Reply-To: <20110105064722.GC2458@legolas.emea.dhcp.ti.com> (Felipe Balbi's message of "Wed, 5 Jan 2011 08:47:22 +0200")

Felipe Balbi <balbi@ti.com> writes:

> On Tue, Jan 04, 2011 at 04:24:58PM -0800, Kevin Hilman wrote:
>> Felipe Balbi <balbi@ti.com> writes:
>> 
>> > Instead of accessing the irq_desc array directly
>> > we can use irq_to_desc(irq). That will allow us to,
>> > if wanted, select SPARSE_IRQ and irq_descs will be
>> > added to a radix tree, instead of a array.
>> >
>> > Signed-off-by: Felipe Balbi <balbi@ti.com>
>> 
>> Can you refresh this one against Tony's omap-for-linus branch. The GPIO
>> omap_device/hwmod conversion changed things around a bit and this patch
>> doesn't apply.
>> 
>> After that, you can send separately, and I'll queue this one along with
>> some other GPIO core fixes for the 2.6.38-rc series after -rc1 comes
>> out.
>
> Sure, it's attached to this mail.

Thanks.  Queueing for 2.6.38-rc

Kevin

>
> From 8d216ccac14e4eebf259d5b40ed2d239248710e1 Mon Sep 17 00:00:00 2001
> From: Felipe Balbi <balbi@ti.com>
> Date: Wed, 5 Jan 2011 08:46:18 +0200
> Subject: [PATCH] arm: omap: gpio: don't access irq_desc array directly
> Organization: Texas Instruments\n
>
> Instead of accessing the irq_desc array directly
> we can use irq_to_desc(irq). That will allow us to,
> if wanted, select SPARSE_IRQ and irq_descs will be
> added to a radix tree, instead of a array.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  arch/arm/plat-omap/gpio.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 1f98e0b..197a6c0 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -756,8 +756,10 @@ static int gpio_irq_type(unsigned irq, unsigned type)
>  	spin_lock_irqsave(&bank->lock, flags);
>  	retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type);
>  	if (retval == 0) {
> -		irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK;
> -		irq_desc[irq].status |= type;
> +		struct irq_desc *d = irq_to_desc(irq);
> +
> +		d->status &= ~IRQ_TYPE_SENSE_MASK;
> +		d->status |= type;
>  	}
>  	spin_unlock_irqrestore(&bank->lock, flags);
>  
> @@ -1671,7 +1673,9 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank)
>  
>  	for (j = bank->virtual_irq_start;
>  		     j < bank->virtual_irq_start + bank_width; j++) {
> -		lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class);
> +		struct irq_desc *d = irq_to_desc(j);
> +
> +		lockdep_set_class(&d->lock, &gpio_lock_class);
>  		set_irq_chip_data(j, bank);
>  		if (bank_is_mpuio(bank))
>  			set_irq_chip(j, &mpuio_irq_chip);

  reply	other threads:[~2011-01-05 17:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 12:02 [PATCH 0/4] ARM IRQ Changes Felipe Balbi
2011-01-04 12:02 ` Felipe Balbi
2011-01-04 12:02 ` [PATCH 1/4] arm: omap: gpio: don't access irq_desc array directly Felipe Balbi
2011-01-04 12:02   ` Felipe Balbi
2011-01-05  0:24   ` Kevin Hilman
2011-01-05  0:24     ` Kevin Hilman
2011-01-05  6:47     ` Felipe Balbi
2011-01-05  6:47       ` Felipe Balbi
2011-01-05 17:11       ` Kevin Hilman [this message]
2011-01-05 17:11         ` Kevin Hilman
2011-01-04 12:02 ` [PATCH 2/4] arm: Kconfig: remove duplicated GENERIC_HARDIRQS entry Felipe Balbi
2011-01-04 12:02   ` Felipe Balbi
2011-01-04 14:00   ` Uwe Kleine-König
2011-01-04 14:00     ` Uwe Kleine-König
2011-01-04 14:09     ` Felipe Balbi
2011-01-04 14:09       ` Felipe Balbi
2011-01-04 17:33     ` Russell King - ARM Linux
2011-01-04 17:33       ` Russell King - ARM Linux
2011-01-04 20:54       ` Uwe Kleine-König
2011-01-04 20:54         ` Uwe Kleine-König
2011-01-05  6:51         ` Felipe Balbi
2011-01-05  6:51           ` Felipe Balbi
2011-01-04 12:02 ` [PATCH 3/4] arm: Kconfig: remove duplicated SPARSE_IRQ entry Felipe Balbi
2011-01-04 12:02   ` Felipe Balbi
2011-01-04 12:02 ` [PATCH 4/4] arm: Kconfig: allow OMAP to use sparse IRQ numbering Felipe Balbi
2011-01-04 12:02   ` Felipe Balbi

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=8762u31dix.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.com \
    /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.