All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ganapatrao Kulkarni <gpkulkarni@gmail.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-metag@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	rfranz@cavium.com, Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"msalter@redhat.com" <msalter@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Steve Capper <steve.capper@linaro.org>
Subject: Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
Date: Tue, 19 Jan 2016 12:44:13 +0000	[thread overview]
Message-ID: <CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com> (raw)
In-Reply-To: <20160119094150.GA4991@red-moon>

On Tue, Jan 19, 2016 at 3:11 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Jan 19, 2016 at 11:28:56AM +0530, Ganapatrao Kulkarni wrote:
>> On Mon, Jan 18, 2016 at 11:11 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> > 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.
>> is it more appropriate to call of_platform_device_create ?
>
> That's already done to create the platform device by OF core when
> populating devices from DT, what David suggested is that you should
> add set_dev_node() to core OF code instead of adding it specifically
> to the PCI host generic code.
This patch was worked on 4.2(inherited to 4.4) to have correct
numa_node populated on sysfs.
however, on 4.4, OF  is fixed to set numa_node(fixed by
56f2de81e020c537f7e35550d13840143cb765cd)

This patch (patch #5) is not required and will be dropped.
thanks for your comments.


>
> Lorenzo
thanks
Ganapat

WARNING: multiple messages have this Message-ID (diff)
From: Ganapatrao Kulkarni <gpkulkarni@gmail.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-metag@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	rfranz@cavium.com, Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"msalter@redhat.com" <msalter@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Steve Capper <steve.capper@linaro.org>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Al Stone <al.stone@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Marc Zyngier <marc.zyngier@arm.com>,
	tony.luck@intel.com, fenghua.yu@intel.com,
	james.hogan@imgtec.com,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	Jon Masters <jonathan@jonmasters.org>,
	Robert Richter <rrichter@cavium.com>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>
Subject: Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
Date: Tue, 19 Jan 2016 18:02:13 +0530	[thread overview]
Message-ID: <CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com> (raw)
In-Reply-To: <20160119094150.GA4991@red-moon>

On Tue, Jan 19, 2016 at 3:11 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Jan 19, 2016 at 11:28:56AM +0530, Ganapatrao Kulkarni wrote:
>> On Mon, Jan 18, 2016 at 11:11 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> > 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.
>> is it more appropriate to call of_platform_device_create ?
>
> That's already done to create the platform device by OF core when
> populating devices from DT, what David suggested is that you should
> add set_dev_node() to core OF code instead of adding it specifically
> to the PCI host generic code.
This patch was worked on 4.2(inherited to 4.4) to have correct
numa_node populated on sysfs.
however, on 4.4, OF  is fixed to set numa_node(fixed by
56f2de81e020c537f7e35550d13840143cb765cd)

This patch (patch #5) is not required and will be dropped.
thanks for your comments.


>
> Lorenzo
thanks
Ganapat

WARNING: multiple messages have this Message-ID (diff)
From: Ganapatrao Kulkarni <gpkulkarni@gmail.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-metag@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	rfranz@cavium.com, Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"msalter@redhat.com" <msalter@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Steve Capper <steve.capper@linaro.org>
Subject: Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
Date: Tue, 19 Jan 2016 18:02:13 +0530	[thread overview]
Message-ID: <CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com> (raw)
In-Reply-To: <20160119094150.GA4991@red-moon>

On Tue, Jan 19, 2016 at 3:11 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Jan 19, 2016 at 11:28:56AM +0530, Ganapatrao Kulkarni wrote:
>> On Mon, Jan 18, 2016 at 11:11 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> > 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.
>> is it more appropriate to call of_platform_device_create ?
>
> That's already done to create the platform device by OF core when
> populating devices from DT, what David suggested is that you should
> add set_dev_node() to core OF code instead of adding it specifically
> to the PCI host generic code.
This patch was worked on 4.2(inherited to 4.4) to have correct
numa_node populated on sysfs.
however, on 4.4, OF  is fixed to set numa_node(fixed by
56f2de81e020c537f7e35550d13840143cb765cd)

This patch (patch #5) is not required and will be dropped.
thanks for your comments.


>
> Lorenzo
thanks
Ganapat

WARNING: multiple messages have this Message-ID (diff)
From: Ganapatrao Kulkarni <gpkulkarni@gmail.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	Will Deacon <Will.Deacon@arm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-pci@vger.kernel.org, linux-ia64@vger.kernel.org,
	linux-metag@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Grant Likely <grant.likely@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>,
	rfranz@cavium.com, Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"msalter@redhat.com" <msalter@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Steve Capper <steve.capper@linaro.org>,
	Hanjun Guo <hanjun.guo@linaro.org>,
	Al Stone <al.stone@linaro.org>, Arnd Bergmann <arnd@arndb.de>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>, Marc Zyngier <marc.zyngier@arm.com>,
	tony.luck@intel.com, fenghua.yu@intel.com,
	james.hogan@imgtec.com,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	mingo@redhat.com, hpa@zytor.com, x86@kernel.org,
	Jon Masters <jonathan@jonmasters.org>,
	Robert Richter <rrichter@cavium.com>,
	Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>
Subject: Re: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
Date: Tue, 19 Jan 2016 18:02:13 +0530	[thread overview]
Message-ID: <CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com> (raw)
In-Reply-To: <20160119094150.GA4991@red-moon>

On Tue, Jan 19, 2016 at 3:11 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Jan 19, 2016 at 11:28:56AM +0530, Ganapatrao Kulkarni wrote:
>> On Mon, Jan 18, 2016 at 11:11 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> > 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.
>> is it more appropriate to call of_platform_device_create ?
>
> That's already done to create the platform device by OF core when
> populating devices from DT, what David suggested is that you should
> add set_dev_node() to core OF code instead of adding it specifically
> to the PCI host generic code.
This patch was worked on 4.2(inherited to 4.4) to have correct
numa_node populated on sysfs.
however, on 4.4, OF  is fixed to set numa_node(fixed by
56f2de81e020c537f7e35550d13840143cb765cd)

This patch (patch #5) is not required and will be dropped.
thanks for your comments.


>
> Lorenzo
thanks
Ganapat

WARNING: multiple messages have this Message-ID (diff)
From: gpkulkarni@gmail.com (Ganapatrao Kulkarni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware
Date: Tue, 19 Jan 2016 18:02:13 +0530	[thread overview]
Message-ID: <CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com> (raw)
In-Reply-To: <20160119094150.GA4991@red-moon>

On Tue, Jan 19, 2016 at 3:11 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Jan 19, 2016 at 11:28:56AM +0530, Ganapatrao Kulkarni wrote:
>> On Mon, Jan 18, 2016 at 11:11 PM, David Daney <ddaney.cavm@gmail.com> wrote:
>> > 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.
>> is it more appropriate to call of_platform_device_create ?
>
> That's already done to create the platform device by OF core when
> populating devices from DT, what David suggested is that you should
> add set_dev_node() to core OF code instead of adding it specifically
> to the PCI host generic code.
This patch was worked on 4.2(inherited to 4.4) to have correct
numa_node populated on sysfs.
however, on 4.4, OF  is fixed to set numa_node(fixed by
56f2de81e020c537f7e35550d13840143cb765cd)

This patch (patch #5) is not required and will be dropped.
thanks for your comments.


>
> Lorenzo
thanks
Ganapat

  reply	other threads:[~2016-01-19 12:44 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 16:35 [PATCH v9 0/6] arm64, numa: Add numa support for arm64 platforms Ganapatrao Kulkarni
2016-01-18 16:47 ` Ganapatrao Kulkarni
2016-01-18 16:35 ` Ganapatrao Kulkarni
2016-01-18 16:35 ` Ganapatrao Kulkarni
2016-01-18 16:35 ` Ganapatrao Kulkarni
2016-01-18 16:36 ` [PATCH v9 1/6] arm64, numa: adding " Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-26 18:52   ` Bjorn Helgaas
2016-01-26 18:52     ` Bjorn Helgaas
2016-01-26 18:52     ` Bjorn Helgaas
2016-01-26 18:52     ` Bjorn Helgaas
2016-01-18 16:36 ` [PATCH v9 2/6] Documentation, dt, arm64/arm: dt bindings for numa Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-20 14:18   ` Rob Herring
2016-01-20 14:18     ` Rob Herring
2016-01-20 14:18     ` Rob Herring
2016-01-20 14:18     ` Rob Herring
2016-01-26 17:16     ` Ganapatrao Kulkarni
2016-01-26 17:28       ` Ganapatrao Kulkarni
2016-01-26 17:16       ` Ganapatrao Kulkarni
2016-01-26 17:16       ` Ganapatrao Kulkarni
2016-01-26 17:16       ` Ganapatrao Kulkarni
2016-01-18 16:36 ` [PATCH v9 3/6] arm64/arm, numa, dt: adding numa dt binding implementation for arm64 platforms Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
     [not found]   ` <1453134965-6125-4-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-26 20:36     ` Bjorn Helgaas
2016-01-26 20:36       ` Bjorn Helgaas
2016-01-26 20:36       ` Bjorn Helgaas
2016-01-26 20:36       ` Bjorn Helgaas
2016-01-28 14:39       ` Will Deacon
2016-01-28 14:39         ` Will Deacon
2016-01-28 14:39         ` Will Deacon
2016-01-28 17:12         ` Ganapatrao Kulkarni
2016-01-28 17:24           ` Ganapatrao Kulkarni
2016-01-28 17:24           ` Ganapatrao Kulkarni
2016-01-28 17:12           ` Ganapatrao Kulkarni
2016-01-28 17:12           ` Ganapatrao Kulkarni
2016-01-28 17:12           ` Ganapatrao Kulkarni
2016-01-28 17:12           ` Ganapatrao Kulkarni
2016-01-28 18:08           ` Will Deacon
2016-01-28 18:08             ` Will Deacon
2016-01-28 18:08             ` Will Deacon
2016-01-28 18:08             ` Will Deacon
2016-01-28 18:08             ` Will Deacon
2016-01-28 18:48             ` Ganapatrao Kulkarni
2016-01-28 18:48               ` Ganapatrao Kulkarni
2016-01-28 18:48               ` Ganapatrao Kulkarni
2016-01-28 18:48               ` Ganapatrao Kulkarni
2016-01-28 18:48               ` Ganapatrao Kulkarni
2016-01-28 18:48               ` Ganapatrao Kulkarni
2016-01-18 16:36 ` [PATCH v9 4/6] arm64, dt, thunderx: Add initial dts for Cavium Thunderx in 2 node topology Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 17:49   ` David Daney
2016-01-18 17:49     ` David Daney
2016-01-18 17:49     ` David Daney
2016-01-18 17:49     ` David Daney
2016-01-18 16:36 ` [PATCH v9 5/6] PCI: generic: Make pci-host-generic driver numa aware Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 17:41   ` David Daney
2016-01-18 17:41     ` David Daney
2016-01-18 17:41     ` David Daney
2016-01-18 17:41     ` David Daney
2016-01-19  5:58     ` Ganapatrao Kulkarni
2016-01-19  6:10       ` Ganapatrao Kulkarni
2016-01-19  5:59       ` Ganapatrao Kulkarni
2016-01-19  5:58       ` Ganapatrao Kulkarni
2016-01-19  5:58       ` Ganapatrao Kulkarni
2016-01-19  5:58       ` Ganapatrao Kulkarni
     [not found]       ` <CAFpQJXXESn1EA5kotVOH2oLbRUSpOLf6+MeWG1pY_GhUP+4vVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-19  9:41         ` Lorenzo Pieralisi
2016-01-19  9:41           ` Lorenzo Pieralisi
2016-01-19  9:41           ` Lorenzo Pieralisi
2016-01-19  9:41           ` Lorenzo Pieralisi
2016-01-19  9:41           ` Lorenzo Pieralisi
2016-01-19 12:32           ` Ganapatrao Kulkarni [this message]
2016-01-19 12:44             ` Ganapatrao Kulkarni
2016-01-19 12:32             ` Ganapatrao Kulkarni
2016-01-19 12:32             ` Ganapatrao Kulkarni
2016-01-19 12:32             ` Ganapatrao Kulkarni
     [not found]   ` <1453134965-6125-6-git-send-email-gkulkarni-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2016-01-26 20:50     ` Bjorn Helgaas
2016-01-26 20:50       ` Bjorn Helgaas
2016-01-26 20:50       ` Bjorn Helgaas
2016-01-26 20:50       ` Bjorn Helgaas
2016-01-26 20:52       ` Bjorn Helgaas
2016-01-26 20:52         ` Bjorn Helgaas
2016-01-26 20:52         ` Bjorn Helgaas
2016-01-26 20:52         ` Bjorn Helgaas
2016-01-18 16:36 ` [RFC PATCH v9 6/6] topology, cleanup: Avoid redefinition of cpumask_of_pcibus in asm header files Ganapatrao Kulkarni
2016-01-18 16:48   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni
2016-01-18 16:36   ` Ganapatrao Kulkarni

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=CAFpQJXV_5mryP5ZT5ezE7N9Csj97g7029D_9Fj_fNJ8+5n6O2w@mail.gmail.com \
    --to=gpkulkarni@gmail.com \
    --cc=Will.Deacon@arm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gkulkarni@caviumnetworks.com \
    --cc=grant.likely@linaro.org \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-metag@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=msalter@redhat.com \
    --cc=rfranz@cavium.com \
    --cc=robh+dt@kernel.org \
    --cc=steve.capper@linaro.org \
    /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.