From: Arnd Bergmann <arnd@arndb.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Tomasz Nowicki <tn@semihalf.com>,
Liviu Dudau <liviu.dudau@arm.com>,
linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2 1/2] PCI: Add new method for registering PCI hosts
Date: Thu, 30 Jun 2016 17:37:35 +0200 [thread overview]
Message-ID: <5307392.exoejlJp9x@wuerfel> (raw)
In-Reply-To: <20160630151931.29216-1-thierry.reding@gmail.com>
On Thursday, June 30, 2016 5:19:30 PM CEST Thierry Reding wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> This patch makes the existing pci_host_bridge structure a proper device
> that is usable by PCI host drivers in a more standard way. In addition
> to the existing pci_scan_bus, pci_scan_root_bus, pci_scan_root_bus_msi,
> and pci_create_root_bus interfaces, this unfortunately means having to
> add yet another interface doing basically the same thing, and add some
> extra code in the initial step.
Thanks a lot for following up on my patches and getting them to work!
> As mentioned in a previous email, one open question is whether we want
> to export a function for allocating a pci_host_bridge device in
> combination with the per-device structure or let the driver itself
> call kzalloc.
>
> Changes in v2 (Thierry Reding):
> - add a pci_host_bridge_init() helper that drivers can use to perform
> all the necessary steps to initialize the bridge
For these two points, the addition of pci_host_bridge_init() to me
tips the balance in favour of having a separate allocation function
that also does the initialization, something like
struct struct pci_host_bridge *pci_host_bridge_alloc(size_t priv)
{
struct pci_host_bridge *bridge;
bridge = kzalloc(sizeof(*bridge) + priv, GFP_KERNEL);
if (!bridge)
return NULL;
INIT_LIST_HEAD(&bridge->windows);
if (priv)
bridge->private = &bridge[1];
return bridge;
}
Arnd
next prev parent reply other threads:[~2016-06-30 15:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 15:19 [PATCH v2 1/2] PCI: Add new method for registering PCI hosts Thierry Reding
2016-06-30 15:19 ` [PATCH v2 2/2] PCI: tegra: Use new pci_register_host() interface Thierry Reding
2016-06-30 15:37 ` Arnd Bergmann [this message]
2016-07-01 14:14 ` [PATCH v2 1/2] PCI: Add new method for registering PCI hosts Liviu Dudau
2016-07-01 14:24 ` Arnd Bergmann
2016-07-01 14:52 ` Liviu Dudau
2016-07-01 15:17 ` Arnd Bergmann
2016-07-01 15:40 ` Liviu Dudau
2016-07-01 15:58 ` Arnd Bergmann
2016-07-01 14:46 ` Liviu Dudau
2016-07-01 15:44 ` Arnd Bergmann
2016-07-01 16:09 ` Liviu Dudau
2016-07-01 16:30 ` Arnd Bergmann
2016-07-04 9:56 ` Liviu Dudau
2016-07-04 13:46 ` Arnd Bergmann
2016-07-28 20:43 ` Bjorn Helgaas
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=5307392.exoejlJp9x@wuerfel \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=thierry.reding@gmail.com \
--cc=tn@semihalf.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