From: Bjorn Helgaas <helgaas@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Sergio Paracuellos" <sergio.paracuellos@gmail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [RFC PATCH 1/3] PCI: Add standard PCI Config Address macros
Date: Tue, 13 Sep 2022 16:11:43 -0500 [thread overview]
Message-ID: <20220913211143.GA624473@bhelgaas> (raw)
In-Reply-To: <20220911112024.14304-2-pali@kernel.org>
On Sun, Sep 11, 2022 at 01:20:22PM +0200, Pali Rohár wrote:
> Lot of PCI and PCIe controllers are using standard Config Address for PCI
> Configuration Mechanism #1 (as defined inPCI Local Bus Specification) or
> its extended version.
>
> So introduce new macros PCI_CONF1_ADDRESS() and PCI_CONF1_EXT_ADDRESS() in
> new include file linux/pci-conf1.h which can be suitable for PCI and PCIe
> controllers which uses this type of access to PCI config space.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> include/linux/pci-conf1.h | 51 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
> create mode 100644 include/linux/pci-conf1.h
This seems like a nice addition, but it would be nice if we could
encapsulate it in drivers/pci.
I know it's parallel to the existing include/linux/pci-ecam.h. I wish
we could encapsulate *that* in drivers/pci, too. For pci-ecam.h, I
think the only things that prevent that are drivers/acpi/pci_mcfg.c,
loongarch, and a few arm64 things.
pci_mcfg.c arguably would make more sense in drivers/pci; it uses
acpi_table_parse(), but no other ACPI services.
The arm64 code that uses pci-ecam.h is really generic code that would
not be in arch/arm64 except for the fact that x86 has really ugly
legacy x86-specific mmconfig code.
I guess that's a long-winded way of saying that I think maybe we could
put this in drivers/pci/pci.h even though the parallel ECAM stuff is
in include/linux/pci-ecam.h.
Bjorn
next prev parent reply other threads:[~2022-09-13 21:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 11:20 [RFC PATCH 0/3] PCI: Introduce new PCI_CONF1_ADDRESS() and PCI_CONF1_EXT_ADDRESS() macros Pali Rohár
2022-09-11 11:20 ` [RFC PATCH 1/3] PCI: Add standard PCI Config Address macros Pali Rohár
2022-09-13 21:11 ` Bjorn Helgaas [this message]
2022-09-13 21:24 ` Pali Rohár
2022-09-13 21:53 ` Bjorn Helgaas
2022-09-11 11:20 ` [RFC PATCH 2/3] PCI: ftpci100: Use PCI_CONF1_ADDRESS() macro Pali Rohár
2022-09-11 11:20 ` [RFC PATCH 3/3] PCI: mt7621: Use PCI_CONF1_EXT_ADDRESS() macro Pali Rohár
2022-09-12 9:30 ` Sergio Paracuellos
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=20220913211143.GA624473@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=pali@kernel.org \
--cc=robh@kernel.org \
--cc=sergio.paracuellos@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
all inboxes | Powered by JetHome®