linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Ard Biesheuvel <ardb@kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
	Jeremy Linton <jeremy.linton@arm.com>,
	Ali Saidi <alisaidi@amazon.com>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [EXTERNAL]arm64 PCI resource allocation issue
Date: Tue, 02 Aug 2022 10:18:38 +0100	[thread overview]
Message-ID: <d7328d63126096be3d631d013b02c30bbdd1524a.camel@infradead.org> (raw)
In-Reply-To: <CAMj1kXFWN80TENuP-0E09LEqrqqL2zoS3SDCeQE7aMZuBPA53Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

On Tue, 2022-08-02 at 09:46 +0200, Ard Biesheuvel wrote:
> > If we want this, I would propose (happy to provide the implementation
> > but let's discuss the design first) something along the line of a
> > generic mechanism to "register" such a system device, which would add
> > it to a list. That list would be scanned on PCI device discovery for
> > BAR address matches, and the pci_dev/BAR# added to the entry (that or
> > put a pointer to the entry into pci_dev for speed/efficiency).
> 
> This means that bus numbers cannot be reassigned, which I don't think
> we rely on today. To positively identify a PCI device, you'll need
> some kind of path notation to avoid relying on the bus numbers
> assigned by the firmware (this could happen for hot-pluggable root
> ports where no bus range has been reserved by the firmware)

That kind of path notation already exists for the Intel IOMMU, and
probably others. See dmar_match_pci_path(), dmar_pci_bus_add_dev() etc.

It would be good to lift that out and make it generic, rather than
reinventing another version.


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

  reply	other threads:[~2022-08-02  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  4:07 arm64 PCI resource allocation issue Benjamin Herrenschmidt
2022-08-02  7:46 ` Ard Biesheuvel
2022-08-02  9:18   ` David Woodhouse [this message]
2022-08-03  2:32     ` [EXTERNAL]arm64 " Benjamin Herrenschmidt
2022-08-03  2:31   ` arm64 " Benjamin Herrenschmidt
2022-08-04 10:36 ` Lorenzo Pieralisi
2022-08-04 23:51   ` Benjamin Herrenschmidt
2022-08-15 23:02     ` Benjamin Herrenschmidt

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=d7328d63126096be3d631d013b02c30bbdd1524a.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=alisaidi@amazon.com \
    --cc=ardb@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=jeremy.linton@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@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).