Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311714
| From | David Daney <ddaney.cavm@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware |
| Date | 2016-01-18 18:50 +0100 |
| Message-ID | <qSm6e-3ZZ-17@gated-at.bofh.it> (permalink) |
| References | <qSlDc-3Oc-29@gated-at.bofh.it> <qSm6e-3ZZ-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/18/2016 08:36 AM, Ganapatrao Kulkarni wrote:
> update numa_node of device associated with pci bus.
> moved down devm_kzalloc to allocate from node memory.
>
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> ---
> drivers/pci/host/pci-host-generic.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
> index 5434c90..0e1ce06 100644
> --- a/drivers/pci/host/pci-host-generic.c
> +++ b/drivers/pci/host/pci-host-generic.c
> @@ -215,11 +215,9 @@ static int gen_pci_probe(struct platform_device *pdev)
> const struct of_device_id *of_id;
> struct device *dev = &pdev->dev;
> struct device_node *np = dev->of_node;
> - struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
> + struct gen_pci *pci;
> struct pci_bus *bus, *child;
>
> - if (!pci)
> - return -ENOMEM;
>
> type = of_get_property(np, "device_type", NULL);
> if (!type || strcmp(type, "pci")) {
> @@ -230,6 +228,11 @@ static int gen_pci_probe(struct platform_device *pdev)
> of_pci_check_probe_only();
>
> of_id = of_match_node(gen_pci_of_match, np);
> + set_dev_node(dev, of_node_to_nid(np));
This shouldn't be done in individual platform_drivers, but instead in
the device probing code.
There is code that does this in drivers/of/platform.c and
drivers/of/device.c Is that not being called for the pci-host-gweneric
devices? If not, we should figure out why, and perhaps attempt to fix
it rather than doing it here.
> + pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
> + if (!pci)
> + return -ENOMEM;
> +
> pci->cfg.ops = (struct gen_pci_cfg_bus_ops *)of_id->data;
> pci->host.dev.parent = dev;
> INIT_LIST_HEAD(&pci->host.windows);
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v9 0/6] arm64, numa: Add numa support for arm64 platforms Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> - 2016-01-18 18:20 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware David Daney <ddaney.cavm@gmail.com> - 2016-01-18 18:50 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-01-19 07:00 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-01-19 10:50 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-01-19 13:40 +0100
Re: [PATCH v9 4/6] arm64, dt, thunderx: Add initial dts for Cavium Thunderx in 2 node topology. David Daney <ddaney.cavm@gmail.com> - 2016-01-18 19:00 +0100
Re: [PATCH v9 2/6] Documentation, dt, arm64/arm: dt bindings for numa. Rob Herring <robh@kernel.org> - 2016-01-20 15:20 +0100
Re: [PATCH v9 2/6] Documentation, dt, arm64/arm: dt bindings for numa. Ganapatrao Kulkarni <gpkulkarni@gmail.com> - 2016-01-26 18:20 +0100
Re: [PATCH v9 1/6] arm64, numa: adding numa support for arm64 platforms. Bjorn Helgaas <helgaas@kernel.org> - 2016-01-26 20:00 +0100
Re: [PATCH v9 3/6] arm64/arm, numa, dt: adding numa dt binding implementation for arm64 platforms. Bjorn Helgaas <helgaas@kernel.org> - 2016-01-26 21:40 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Bjorn Helgaas <helgaas@kernel.org> - 2016-01-26 22:00 +0100
Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Bjorn Helgaas <helgaas@kernel.org> - 2016-01-26 22:00 +0100
csiph-web