public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: benh@kernel.crashing.org (Benjamin Herrenschmidt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv7 07/13] irqdomain: add function to find a MSI irq_domain
Date: Thu, 08 Aug 2013 18:54:49 +1000	[thread overview]
Message-ID: <1375952089.12551.40.camel@pasglop> (raw)
In-Reply-To: <1375951106.12551.28.camel@pasglop>

On Thu, 2013-08-08 at 18:38 +1000, Benjamin Herrenschmidt wrote:
> For example the generic irq_chip is orthogonal to irq remapping via
> irq_domain. It's possible to instanciate irq_chips without device nodes,
> and with a completely different firmware representation (ACPI ?). It
> should be the same with msi-chip.

In fact, to a large extent, the original irq_domain was also orthogonal
to the device-tree ...

I did add the ability to match a device-node with an irq domain but that
has always been just an optional addition, it was possible (and should
still be though I haven't looked in a while) to create irq domains
completely independently of the device-tree.

Now there is one thing that might sway me ... if you can show me (sorry
don't have the bandwidth to look in details and scrutinize the patch)
that overall, having the msi_chip in the domain as an optional facility
does indeed overall make the code *much* smaller than keeping them
separate, and for more than just your use case.

One reason I don't like the allocator being in irq domain is that it
really only is useful for a subset of the different types of domains
around.

For example, on power server, I have a unique domain accross the fabric
(irqs are special powerbus messages that are encoded in a 24 bit number),
but each "source" (a PCI host bridge for example) gets a subset of that
domain, typically a fixed range.

So your allocator would only be useful to that case if:

  - It can be used to allocate within specific boundaries

  - It works with radix based domains

This is just an example... I don't like bolting a facility (allocation)
in a lawyer originally designed to do something else (mapping) unless
that facility is directly useful to the vast majority of the users of the
layer in question.

In fact, there is an argument to be made to provide a generic bitmap
allocator specialized for MSIs. MSIs have quirks ... alignment constraints
for multiple MSI-non-X for example, which might potentially benefit in
having an allocator with some smarts to limit fragmentation. That sort
of things....

Cheers,
Ben.

  reply	other threads:[~2013-08-08  8:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  9:32 [PATCHv7 00/13] MSI support for Marvell EBU PCIe driver Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 01/13] PCI: use weak functions for MSI arch-specific functions Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 02/13] PCI: remove ARCH_SUPPORTS_MSI kconfig option Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 03/13] PCI: Introduce new MSI chip infrastructure Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 04/13] irqdomain: add irq_alloc_mapping() function Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 05/13] irqdomain: refactor __irq_domain_add() Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 06/13] irqdomain: add support to associate an irq_domain with a msi_chip Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 07/13] irqdomain: add function to find a MSI irq_domain Thomas Petazzoni
2013-08-07 20:50   ` Benjamin Herrenschmidt
2013-08-07 22:04     ` Thomas Petazzoni
2013-08-07 22:31       ` Benjamin Herrenschmidt
2013-08-07 22:42         ` Benjamin Herrenschmidt
2013-08-07 22:45           ` Benjamin Herrenschmidt
2013-08-08  8:22             ` Thomas Petazzoni
2013-08-08  8:41               ` Benjamin Herrenschmidt
2013-08-08  8:16         ` Thomas Petazzoni
2013-08-08  8:38           ` Benjamin Herrenschmidt
2013-08-08  8:54             ` Benjamin Herrenschmidt [this message]
2013-08-07  9:32 ` [PATCHv7 08/13] irqchip: armada-370-xp: properly request resources Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 09/13] irqchip: armada-370-xp: implement MSI support Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 10/13] ARM: pci: add ->add_bus() and ->remove_bus() hooks to hw_pci Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 11/13] ARM: mvebu: the MPIC now provides MSI controller features Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 12/13] PCI: mvebu: add support for MSI Thomas Petazzoni
2013-08-07  9:32 ` [PATCHv7 13/13] ARM: mvebu: link PCIe controllers to the MSI controller Thomas Petazzoni
2013-08-07 20:23 ` [PATCHv7 00/13] MSI support for Marvell EBU PCIe driver Jason Cooper

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=1375952089.12551.40.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox