All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@cavium.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Sergey Temerkhanov <s.temerkhanov@gmail.com>,
	Sinan Kaya <okaya@codeaurora.org>,
	Zhou Wang <wangzhou1@hisilicon.com>,
	Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
Subject: Re: [RFC/RFT PATCH v2 3/3] PCI/ACPI: Add ACPI pci_bus_find_numa_node() implementation
Date: Wed, 17 May 2017 16:35:58 +0200	[thread overview]
Message-ID: <20170517143558.GP16981@rric.localdomain> (raw)
In-Reply-To: <20170517134654.GA8497@red-moon>

On 17.05.17 14:46:54, Lorenzo Pieralisi wrote:

> More explicitly, I think the whole series should work also with the diff
> below applied on top of it. Side note: for consistency, I do not think
> that adding a DT counterpart to pci_bus_find_numa_node() would hurt.
> 
> Thanks !
> Lorenzo
> 
> -- >8 --
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 76c089f..cf0692c 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -862,7 +862,7 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
>  	 */
>  	child->dev.class = &pcibus_class;
>  	dev_set_name(&child->dev, "%04x:%02x", pci_domain_nr(child), busnr);
> -	set_dev_node(&child->dev, dev_to_node(&parent->dev));
> +

Hmm, in device_add() there is already:

	/* use parent numa_node */
	if (parent && (dev_to_node(dev) == NUMA_NO_NODE))
        	set_dev_node(dev, dev_to_node(parent));

So there are cases where the device has a different node than the
parent. I am not sure if we can assume for pci that it maps always.

And since device_add() is called later anyway, the above change might
not necessary at all. But at least we must assign the node id to the
bridge, which is the parent. Maybe just have in
acpi_pci_root_create():

	bridge = get_device(bus->bridge);
	adev = to_acpi_device_node(bridge->fwnode);
	set_dev_node(bridge, acpi_get_node(adev->handle));

-Robert


>  	/*
>  	 * Set up the primary, secondary and subordinate
>  	 * bus numbers.

  reply	other threads:[~2017-05-17 14:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 13:22 [RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection Lorenzo Pieralisi
2017-05-15 13:22 ` [RFC/RFT PATCH v2 1/3] PCI: Introduce pci_bus_find_numa_node() Lorenzo Pieralisi
2017-05-15 13:22 ` [RFC/RFT PATCH v2 2/3] PCI: Add call to set-up NUMA node for struct pci_bus devices Lorenzo Pieralisi
2017-05-15 13:22 ` [RFC/RFT PATCH v2 3/3] PCI/ACPI: Add ACPI pci_bus_find_numa_node() implementation Lorenzo Pieralisi
2017-05-16 15:15   ` Robert Richter
2017-05-16 18:02     ` Lorenzo Pieralisi
2017-05-17 13:46       ` Lorenzo Pieralisi
2017-05-17 14:35         ` Robert Richter [this message]
2017-05-17 16:04           ` Lorenzo Pieralisi
2017-05-17 16:15             ` Robert Richter
2017-05-15 13:51 ` [RFC/RFT PATCH v2 0/3] PCI: generic device NUMA node detection Vadim Lomovtsev
2017-05-16 14:57 ` Robert Richter

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=20170517143558.GP16981@rric.localdomain \
    --to=robert.richter@cavium.com \
    --cc=Vadim.Lomovtsev@caviumnetworks.com \
    --cc=bhelgaas@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=okaya@codeaurora.org \
    --cc=s.temerkhanov@gmail.com \
    --cc=wangzhou1@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.