linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Mason <slash.tmp@free.fr>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	 linux-pci <linux-pci@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 Will Deacon <will.deacon@arm.com>,
	 David Daney <david.daney@cavium.com>,
	 Rob Herring <robh@kernel.org>,
	 "Thierry Reding" <treding@nvidia.com>,
	 Phuong Nguyen <phuong_nguyen@sigmadesigns.com>,
	 Thibaud Cornic <thibaud_cornic@sigmadesigns.com>
Subject: Re: Using the generic host PCIe driver
Date: Fri, 03 Mar 2017 16:41:38 +0000	[thread overview]
Message-ID: <87tw7a2tz1.fsf@on-the-bus.cambridge.arm.com> (raw)
In-Reply-To: <4059f88f-0f70-38c2-f2f9-58dd2bd5b280@free.fr> (Mason's message of "Fri, 3 Mar 2017 12:26:27 +0100")

On Fri, Mar 03 2017 at 11:26:27 am GMT, Mason <slash.tmp@free.fr> wrote:
> On 01/03/2017 17:36, Marc Zyngier wrote:
>
>> Mason: while the kernel has generic support for dealing with MSI, there
>> is not standardization at the interrupt controller level, so you do have
>> to write your own driver, and wire it in the rest of the framework.
>> 
>> I suggest you look at things like drivers/pci/host/pcie-altera-msi.c,
>> which has an extremely simple implementation. You can use this as a
>> starting point for your own driver.
>
> Thanks Marc,
>
> I'll have a close look at the Altera driver.
>
> I'm having a hard time understanding 3 different kinds of interrupts:
>
>   1. MSI (message-signalled interrupts)
>   2. legacy interrupts
>   3. custom interrupts

[...]

> I suppose the interrupt controller I'm supposed to write needs
> to handle all 3 types of interrupts?

That's entirely up to you. INTx is the bare minimum. MSI is what people
actually need. The rest has more to do with configuring your host
controller, but only you know about it (and I'm not really interested in
the gory details of how this particular HW works).

I mentioned the Altera driver because it is a very simple example of an
MSI controller driver that uses the generic MSI domains. It doesn't care
about INTx, nor host controller management interrupts (that's handled
separately).
Thanks,

        M.
-- 
Jazz is not dead, it just smell funny.

  reply	other threads:[~2017-03-03 16:41 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 16:14 Using the generic host PCIe driver Mason
2017-02-27 16:44 ` Bjorn Helgaas
2017-02-27 17:02   ` Mason
2017-02-27 18:35     ` Bjorn Helgaas
2017-03-01 15:18       ` Mason
2017-03-01 16:18         ` Bjorn Helgaas
2017-03-01 16:36           ` Marc Zyngier
2017-03-03 11:26             ` Mason
2017-03-03 16:41               ` Marc Zyngier [this message]
2017-03-03 16:53                 ` Mason
2017-03-03 17:08                   ` Marc Zyngier
2017-03-01 18:05           ` Mason
2017-03-01 21:57             ` Bjorn Helgaas
2017-03-03 12:44               ` Mason
2017-03-03 15:46                 ` Bjorn Helgaas
2017-03-03 17:18                   ` Mason
2017-03-03 20:04                     ` Bjorn Helgaas
2017-03-03 23:23                       ` Mason
2017-03-04  9:35                         ` Ard Biesheuvel
2017-03-04 10:56                           ` Mason
2017-03-04 11:45                             ` Ard Biesheuvel
2017-03-04 13:07                               ` Mason
2017-03-04 13:49                                 ` Ard Biesheuvel
2017-03-04 14:33                                   ` Mason
2017-03-04 10:50                       ` Marc Zyngier
2017-03-06 16:12                       ` Mason
2017-03-06 16:57                         ` Mason

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=87tw7a2tz1.fsf@on-the-bus.cambridge.arm.com \
    --to=marc.zyngier@arm.com \
    --cc=david.daney@cavium.com \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=phuong_nguyen@sigmadesigns.com \
    --cc=robh@kernel.org \
    --cc=slash.tmp@free.fr \
    --cc=thibaud_cornic@sigmadesigns.com \
    --cc=treding@nvidia.com \
    --cc=will.deacon@arm.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).