All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better
Date: Tue, 13 Sep 2011 13:33:06 -0500	[thread overview]
Message-ID: <4E6FA1E2.2060706@freescale.com> (raw)
In-Reply-To: <CAOZdJXVm1YL-T8i26O0BiB-uTkXUDnYQdacU8k52aG-K0pZ1Lg@mail.gmail.com>

On 09/07/2011 11:20 AM, Tabi Timur-B04825 wrote:
> The problem is that both offset and irq_index are being incremented in
> the loop, and cascade_data->index is set to the sum of the two.
> 
> Perhaps you meant this:
> 
> 		err = fsl_msi_setup_hwirq(msi, dev, offset, j);

That's not right either, it would retrieve the wrong IRQ from the
interrupts property if you have holes -- try with something like
{ 0 64, 128, 64 }.  The desired behavior there is:

  offset = 0 irq_index = 0
  offset = 1 irq_index = 1
  offset = 4 irq_index = 2
  offset = 5 irq_index = 3

I think the right code (untested) might be:

	err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);

and

	cascade_data->index = offset;

-Scott

WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Tabi Timur-B04825 <B04825-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: Wood Scott-B07421
	<B07421-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Re: [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better
Date: Tue, 13 Sep 2011 13:33:06 -0500	[thread overview]
Message-ID: <4E6FA1E2.2060706@freescale.com> (raw)
In-Reply-To: <CAOZdJXVm1YL-T8i26O0BiB-uTkXUDnYQdacU8k52aG-K0pZ1Lg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 09/07/2011 11:20 AM, Tabi Timur-B04825 wrote:
> The problem is that both offset and irq_index are being incremented in
> the loop, and cascade_data->index is set to the sum of the two.
> 
> Perhaps you meant this:
> 
> 		err = fsl_msi_setup_hwirq(msi, dev, offset, j);

That's not right either, it would retrieve the wrong IRQ from the
interrupts property if you have holes -- try with something like
{ 0 64, 128, 64 }.  The desired behavior there is:

  offset = 0 irq_index = 0
  offset = 1 irq_index = 1
  offset = 4 irq_index = 2
  offset = 5 irq_index = 3

I think the right code (untested) might be:

	err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);

and

	cascade_data->index = offset;

-Scott

  reply	other threads:[~2011-09-13 18:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 20:25 [PATCH] powerpc/fsl_msi: Handle msi-available-ranges better Scott Wood
2011-01-17 20:25 ` Scott Wood
2011-03-15 17:58 ` Kumar Gala
2011-03-15 17:58   ` Kumar Gala
2011-09-07 16:20 ` Tabi Timur-B04825
2011-09-07 16:20   ` Tabi Timur-B04825
2011-09-13 18:33   ` Scott Wood [this message]
2011-09-13 18:33     ` Scott Wood

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=4E6FA1E2.2060706@freescale.com \
    --to=scottwood@freescale.com \
    --cc=B04825@freescale.com \
    --cc=B07421@freescale.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linuxppc-dev@lists.ozlabs.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.