All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Linus Walleij <linus.walleij@stericsson.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Anmar Oueja <anmar.oueja@linaro.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	stable@kernel.org, Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] mfd: db8500-prcmu: fix irqdomain usage
Date: Thu, 20 Dec 2012 01:32:18 +0000	[thread overview]
Message-ID: <20121220013218.A55E93E0AD7@localhost> (raw)
In-Reply-To: <1355928161-8082-1-git-send-email-linus.walleij@stericsson.com>

On Wed, 19 Dec 2012 15:42:41 +0100, Linus Walleij <linus.walleij@stericsson.com> wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
> 
> This fixes two issues with the DB8500 PRCMU irqdomain:
> - You have to state the irq base 0 to get a linear domain
>   for the DT case from irq_domain_add_simple()
> - The irqdomain was not used to translate the initial irq
>   request using irq_create_mapping() making the linear
>   case fail as it was lacking a proper descriptor.
> 
> I took this opportunity to fix two lines of whitespace
> errors in related code as I was anyway messing around with
> it.
> 
> Cc: stable@kernel.org
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Hi Sam, this is a regression and as such should go into the
> -rc series. As you can see I also added the Cc: stable tag.
> 
> Yours,
> Linus Walleij
> ---
>  drivers/mfd/db8500-prcmu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
> index dc8826d..fcac8e0 100644
> --- a/drivers/mfd/db8500-prcmu.c
> +++ b/drivers/mfd/db8500-prcmu.c
> @@ -2524,7 +2524,7 @@ static bool read_mailbox_0(void)
>  
>  		for (n = 0; n < NUM_PRCMU_WAKEUPS; n++) {
>  			if (ev & prcmu_irq_bit[n])
> -				generic_handle_irq(IRQ_PRCMU_BASE + n);
> +				generic_handle_irq(irq_create_mapping(db8500_irq_domain,n));

This looks wrong. It probably works at the moment, but calling
irq_create_mapping when trying to process an IRQ is backwards. There
certainly shouldn't be any processing of an irq that isn't already
mapped. irq_find_mapping() should be used instead.

g.

  parent reply	other threads:[~2012-12-20  1:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 14:42 [PATCH] mfd: db8500-prcmu: fix irqdomain usage Linus Walleij
2012-12-19 15:16 ` Lee Jones
2012-12-20  1:32 ` Grant Likely [this message]
2012-12-20  7:50   ` Lee Jones
2012-12-20  9:17     ` Linus Walleij
2012-12-20 10:04       ` Lee Jones

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=20121220013218.A55E93E0AD7@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=anmar.oueja@linaro.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=stable@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.