linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Hagood <david.hagood@gmail.com>
To: "tiejun.chen" <tiejun.chen@windriver.com>
Cc: Scott Wood <scottwood@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Questions on interrupt vector assignment on MPC8641D
Date: Mon, 11 Oct 2010 06:30:44 -0500	[thread overview]
Message-ID: <1286796644.2545.29.camel@chumley> (raw)
In-Reply-To: <4CB2DE2B.7040504@windriver.com>

On Mon, 2010-10-11 at 17:51 +0800, tiejun.chen wrote:
> 
> You should define MSI device nodes on your target dts. And you can refer to the
> file, mpc8572ds.dts.
> 
> Often U-Boot dose not generate MSI information and embed that to dtb.
> 
> > 
> > But even assuming you can define these nodes at run time, as far as I can
> > see, you are right back to the question of "and how do I know what the
> > mappings are so I can create the node?" You haven't answered the question,
> > you've just moved where you are asking it.
> 
> I think you can check fsl_msi.c to figure out what you want.
<snip>

> Often most latest classic books/articles always use x86 code as an
example to
> clarify Linux. So you have to understand something on PPC via codes.
But I think
> you will benefit more information from the codes than documents :)
> 

RTFS. That wouldn't be bad advice, if the source were actually
commented. None of these APIS have any meaningful comments in them,
around them, or anywhere near them. You'd think we were back in the old
BASIC days, when comments occupied run-time memory. Code can tell me
WHAT is being done, but not WHY, and not what assumptions are being
made.

So when you say "You should define MSI device nodes on your target dts."
we go right back to my comment of "You haven't answered the question,
you've just moved where you are asking it."

> 
> Firstly you should use irq_of_parse_and_map()/irq_create_mapping() to map the
> real hardware irq to virtual irq. Then use request_irq() with the virtual irq to
> hook your interrupt handler.
And when I do that, I get a segfault as my follow-on mail reports.

> 
> Maybe you can check the file, ppc4xx_pci.c since ppc4xx also can support EP as I
> previously said. And sounds Scott will do something to support EP for Freescale
> chip.
I will look at that file.

> 
> Looks you want to your host root complex to trigger MSI to mpc8641 EP target? If
> so I'm a bit confused since MSIs should be delivered to to the Root Complex
> resided on your host.
I want the host to be able to interrupt the PPC. Since this is PCIe, the
only way that will be working is for the root complex to do a write to
somewhere on the PPC. This is basically the same mechanism as MSI, only
with the PPC as the target of the write rather than the root complex.
Obviously, the rest of the PCI devices will be sending interrupts to the
root complex, some via MSI. That has nothing to do with this discussion.

Since the PPC is in endpoint mode, the MSI hardware on the PPC won't be
used. The hardware is writable from the root complex via the PPC BAR0,
so I see no reason not to reuse it to trigger interrupts on the PPC from
the Root complex.

  reply	other threads:[~2010-10-11 11:30 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 14:12 Questions on interrupt vector assignment on MPC8641D david.hagood
2010-09-21 21:37 ` Anderson, Trevor
2010-09-21 22:07   ` Scott Wood
2010-09-22  0:36     ` Chen, Tiejun
2010-10-07 20:12     ` david.hagood
2010-10-07 20:26       ` Scott Wood
2010-10-07 21:01         ` david.hagood
2010-10-09 15:52         ` david.hagood
2010-10-11  9:51           ` tiejun.chen
2010-10-11 11:30             ` David Hagood [this message]
2010-10-11 14:44             ` david.hagood
2010-10-13  1:10               ` Michael Ellerman
2010-10-11 15:51             ` Scott Wood
2010-10-12  1:39               ` tiejun.chen
2010-10-11 15:50           ` Scott Wood
2010-10-11 17:02             ` david.hagood
2010-10-11 17:30               ` Scott Wood
2010-10-12  3:11                 ` tiejun.chen
2010-10-09 17:03         ` david.hagood
2010-10-11  9:55           ` tiejun.chen
2010-10-11 17:17             ` Scott Wood
2010-10-12 20:55               ` david.hagood
2010-10-12 21:21                 ` Scott Wood
2010-10-13  1:17                   ` tiejun.chen
2010-10-13 15:28                     ` Scott Wood
2010-10-13 17:08                       ` david.hagood
2010-10-13 19:56                         ` Scott Wood
2010-10-13 21:16                           ` david.hagood
2010-10-14  1:39                       ` tiejun.chen
2010-10-14  3:27                         ` tiejun.chen
2010-10-14 15:51                           ` Scott Wood
2010-10-14 16:22                             ` david.hagood
2010-10-14 16:32                               ` Scott Wood
2010-10-14 17:20                                 ` david.hagood
2010-10-14 17:50                                   ` Scott Wood
2010-10-14 18:44                                     ` david.hagood
2010-10-15  1:28                             ` tiejun.chen
2010-10-12  3:00             ` tiejun.chen

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=1286796644.2545.29.camel@chumley \
    --to=david.hagood@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=scottwood@freescale.com \
    --cc=tiejun.chen@windriver.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).