devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Tim Harvey <tharvey@gateworks.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	Ben Dooks <ben-linux@fluff.org>, Arnd Bergmann <arnd@arndb.de>,
	linux-sh@vger.kernel.org, Jingoo Han <jg1.han@samsung.com>,
	Richard Zhu <r65037@freescale.com>,
	Simon Horman <horms@verge.net.au>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sascha Hauer <kernel@pengutronix.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [PATCH 0/7] PCI irq mapping fixes and cleanups
Date: Mon, 3 Mar 2014 17:01:02 -0700	[thread overview]
Message-ID: <20140304000102.GC5603@obsidianresearch.com> (raw)
In-Reply-To: <CAJ+vNU2ojt_o9=AOGfpbx6NCOE_kE6tsV8FvjoGYk9BBwP_OFQ@mail.gmail.com>

On Mon, Mar 03, 2014 at 03:40:43PM -0800, Tim Harvey wrote:

> of_irq_parse_and_map_pci().  The GIC function that translates the
> interrupt per domain is given irq_data: 0x123 0x04 0x00 

This has been shifted by 1 byte..

> IRQ 123, which should get 32 added to it for irq155).  Instead, the
> implementation of gic_irq_domain_xlate()
> (http://lxr.missinglinkelectronics.com/linux/drivers/irqchip/irq-gic.c#L832)
> adds 32 to the 0x04 returning 20:
> [    1.841781] of_irq_parse_raw:  /soc/pcie@0x01000000:00000001
> [    1.841813] of_irq_parse_raw: ipar=/soc/pcie@0x01000000, size=1
> [    1.841838]  -> addrsize=3
> [    1.841870]  -> match=1 (imaplen=28)
                              ^^^^^^^^^^^^^

That looks odd, it should be the number of dwords in the
interrupt-map, you have 4 lines of 8 dwords each, so it should be
32. 

You have 7*4, which really suggests to me that your interrupt-map
is corrupted somehow, are you sure you are using this:

>       interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
>                       <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
>                       <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
>                       <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;

If an element was missing it would explain why everything is broken,
in fact if GIC_SPI was missing it would match the debug perfectly.

> [    1.841903]  -> newintsize=3, newaddrsize=1
> [    1.841916]  -> imaplen=23
> [    1.841928]  -> new parent: /interrupt-controller@00a01000
> [    1.841946]  -> got it !

K..

> [    1.841972] irq_create_of_mapping: calling xlate for 123/4/0 3

And it is the wrong data.. 123/4/0 is 


> For the slots above that swizzle to pin2,3,4 of_irq_parse_raw()
> returns -EINVAL because for some reason it can't match an interrupt
> mapping for the pcie host controller:
> [    1.842996] of_irq_parse_raw:  /soc/pcie@0x01000000/pcie@0,0:00000002
> [    1.843046] of_irq_parse_raw: ipar=/soc/pcie@0x01000000, size=1
> [    1.843070]  -> addrsize=3
> [    1.843100]  -> match=0 (imaplen=28)
> ^^^^^ indicates no match in interrupt map.

Well, since we know the map is corrupted somehow, it isn't surprising
that the 2nd entry won't match anything. It is probably matching
against '0 0 2 &intc'
 
Jason

  reply	other threads:[~2014-03-04  0:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 17:28 [PATCH 0/7] PCI irq mapping fixes and cleanups Lucas Stach
2014-02-28 17:28 ` [PATCH 1/7] ARM: dts: tegra: add PCIe interrupt mapping properties Lucas Stach
     [not found]   ` <1393608523-17509-2-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-28 20:27     ` Stephen Warren
2014-02-28 17:28 ` [PATCH 2/7] PCI: tegra: use new OF interrupt mapping when possible Lucas Stach
     [not found] ` <1393608523-17509-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-28 17:28   ` [PATCH 3/7] PCI: rcar: " Lucas Stach
2014-03-01  0:53   ` [PATCH 0/7] PCI irq mapping fixes and cleanups Tim Harvey
2014-03-01 18:30     ` Jason Gunthorpe
2014-03-03  8:11       ` Jingoo Han
2014-03-03 17:49         ` Tim Harvey
2014-03-03 18:01           ` Jason Gunthorpe
2014-03-03 18:28             ` Tim Harvey
2014-03-03 23:40           ` Tim Harvey
2014-03-04  0:01             ` Jason Gunthorpe [this message]
2014-03-04  6:04               ` Tim Harvey
2014-02-28 17:28 ` [PATCH 4/7] ARM: dts: exynos5440: fix PCIe interrupt mapping Lucas Stach
     [not found]   ` <1393608523-17509-5-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-03  7:40     ` Jingoo Han
2014-03-03  7:53       ` Jingoo Han
2014-03-03  9:26         ` Lucas Stach
2014-02-28 17:28 ` [PATCH 5/7] ARM: dts: imx6: add PCIe interrupt mapping properties Lucas Stach
2014-03-05  5:43   ` Shawn Guo
2014-02-28 17:28 ` [PATCH 6/7] PCI: designware: use new OF interrupt mapping when possible Lucas Stach
     [not found]   ` <1393608523-17509-7-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-04 15:05     ` Tim Harvey
2014-02-28 17:28 ` [PATCH 7/7] PCI: designware: split samsung and fsl bindings Lucas Stach
2014-02-28 20:03   ` Arnd Bergmann
2014-03-04 14:13     ` Lucas Stach
2014-03-04 14:53       ` Arnd Bergmann
2014-03-04 15:34         ` Lucas Stach
2014-03-11 13:34           ` Arnd Bergmann
     [not found]   ` <1393608523-17509-8-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-28 20:23     ` Tim Harvey
2014-02-28 20:04 ` [PATCH 0/7] PCI irq mapping fixes and cleanups Arnd Bergmann

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=20140304000102.GC5603@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=arnd@arndb.de \
    --cc=ben-linux@fluff.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horms@verge.net.au \
    --cc=jg1.han@samsung.com \
    --cc=kernel@pengutronix.de \
    --cc=kgene.kim@samsung.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=r65037@freescale.com \
    --cc=shawn.guo@linaro.org \
    --cc=swarren@wwwdotorg.org \
    --cc=tharvey@gateworks.com \
    --cc=thierry.reding@gmail.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 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).