[PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, <linux-ia64@xxxxxxxxxxxxxxx>, <linux-metag@xxxxxxxxxxxxxxx>, <linuxppc-dev@xxxxxxxxxxxxxxxx>, <linux-s390@xxxxxxxxxxxxxxx>, <linux-sh@xxxxxxxxxxxxxxx>, <linux-arch@xxxxxxxxxxxxxxx>, <Will.Deacon@xxxxxxx>, <catalin.marinas@xxxxxxx>, <grant.likely@xxxxxxxxxx>, <leif.lindholm@xxxxxxxxxx>, <rfranz@xxxxxxxxxx>, <ard.biesheuvel@xxxxxxxxxx>, <msalter@xxxxxxxxxx>, <robh+dt@xxxxxxxxxx>, <steve.capper@xxxxxxxxxx>, <hanjun.guo@xxxxxxxxxx>, <al.stone@xxxxxxxxxx>, <arnd@xxxxxxxx>, <pawel.moll@xxxxxxx>, <mark.rutland@xxxxxxx>, <ijc+devicetree@xxxxxxxxxxxxxx>, <galak@xxxxxxxxxxxxxx>, <rjw@xxxxxxxxxxxxx>, <lenb@xxxxxxxxxx>, <marc.zyngier@xxxxxxx>, <lorenzo.pieralisi@xxxxxxx>, <bhelgaas@xxxxxxxxxx>, <tony.luck@xxxxxxxxx>, <fenghua.yu@xxxxxxxxx>, <james.hogan@xxxxxxxxxx>, <benh@xxxxxxxxxxxxxxxxxxx>, <tglx@xxxxxxxxxxxxx>, <mingo@xxxxxxxxxx>, <hpa@xxxxxxxxx>, <x86@xxxxxxxxxx>, <jonathan@xxxxxxxxxxxxxx>, <rrichter@xxxxxxxxxx>, <Prasun.Kapoor@xxxxxxxxxxxxxxxxxx>
- Subject: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
- From: Ganapatrao Kulkarni <gkulkarni@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Jan 2016 22:06:04 +0530
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@xxxxxxxxxxxxxxxxxx;
- Cc: <gpkulkarni@xxxxxxxxx>
- In-reply-to: <1453134965-6125-1-git-send-email-gkulkarni@caviumnetworks.com>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1453134965-6125-1-git-send-email-gkulkarni@caviumnetworks.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:23
update numa_node of device associated with pci bus.
moved down devm_kzalloc to allocate from node memory.
Signed-off-by: Ganapatrao Kulkarni <gkulkarni@xxxxxxxxxxxxxxxxxx>
---
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));
+ 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);
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]