All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2015-12-22 10:38 ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2015-12-22 10:38 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, linux-pci, Will.Deacon,
	catalin.marinas, bhelgaas, hanjun.guo, rrichter, Prasun.Kapoor
  Cc: gpkulkarni

Adding helper functions and necessary code to make
pci driver(pci-host-generic) numa aware.

This patch is on top of arm64-numa v7.
http://www.spinics.net/lists/arm-kernel/msg460813.html

Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
---
 arch/arm64/include/asm/numa.h       | 8 +++++---
 arch/arm64/kernel/pci.c             | 8 ++++++++
 drivers/pci/host/pci-host-generic.c | 1 +
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
index b8c2a3f..1eca4db 100644
--- a/arch/arm64/include/asm/numa.h
+++ b/arch/arm64/include/asm/numa.h
@@ -15,9 +15,11 @@
 extern int __node_distance(int from, int to);
 #define node_distance(a, b) __node_distance(a, b)
 
-/* dummy definitions for pci functions */
-#define pcibus_to_node(node)	0
-#define cpumask_of_pcibus(bus)	0
+struct pci_bus;
+extern int pcibus_to_node(struct pci_bus *bus);
+#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
+				 cpu_all_mask :				\
+				 cpumask_of_node(pcibus_to_node(bus)))
 
 extern int cpu_to_node_map[NR_CPUS];
 extern nodemask_t numa_nodes_parsed __initdata;
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index b3d098b..37e2e9f 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -84,3 +84,11 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 	return NULL;
 }
 #endif
+
+#ifdef CONFIG_NUMA
+int pcibus_to_node(struct pci_bus *bus)
+{
+	return dev_to_node(&bus->dev);
+}
+EXPORT_SYMBOL(pcibus_to_node);
+#endif
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index 5434c90..a821e49 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -230,6 +230,7 @@ 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->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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2015-12-22 10:38 ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2015-12-22 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

Adding helper functions and necessary code to make
pci driver(pci-host-generic) numa aware.

This patch is on top of arm64-numa v7.
http://www.spinics.net/lists/arm-kernel/msg460813.html

Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
---
 arch/arm64/include/asm/numa.h       | 8 +++++---
 arch/arm64/kernel/pci.c             | 8 ++++++++
 drivers/pci/host/pci-host-generic.c | 1 +
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
index b8c2a3f..1eca4db 100644
--- a/arch/arm64/include/asm/numa.h
+++ b/arch/arm64/include/asm/numa.h
@@ -15,9 +15,11 @@
 extern int __node_distance(int from, int to);
 #define node_distance(a, b) __node_distance(a, b)
 
-/* dummy definitions for pci functions */
-#define pcibus_to_node(node)	0
-#define cpumask_of_pcibus(bus)	0
+struct pci_bus;
+extern int pcibus_to_node(struct pci_bus *bus);
+#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
+				 cpu_all_mask :				\
+				 cpumask_of_node(pcibus_to_node(bus)))
 
 extern int cpu_to_node_map[NR_CPUS];
 extern nodemask_t numa_nodes_parsed __initdata;
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index b3d098b..37e2e9f 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -84,3 +84,11 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 	return NULL;
 }
 #endif
+
+#ifdef CONFIG_NUMA
+int pcibus_to_node(struct pci_bus *bus)
+{
+	return dev_to_node(&bus->dev);
+}
+EXPORT_SYMBOL(pcibus_to_node);
+#endif
diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index 5434c90..a821e49 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -230,6 +230,7 @@ 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->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

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2015-12-22 10:38 ` Ganapatrao Kulkarni
@ 2016-01-08 18:01   ` Bjorn Helgaas
  -1 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-08 18:01 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: linux-arm-kernel, linux-kernel, linux-pci, Will.Deacon,
	catalin.marinas, bhelgaas, hanjun.guo, rrichter, Prasun.Kapoor,
	gpkulkarni

On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> Adding helper functions and necessary code to make
> pci driver(pci-host-generic) numa aware.
> 
> This patch is on top of arm64-numa v7.
> http://www.spinics.net/lists/arm-kernel/msg460813.html
> 
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> ---
>  arch/arm64/include/asm/numa.h       | 8 +++++---
>  arch/arm64/kernel/pci.c             | 8 ++++++++
>  drivers/pci/host/pci-host-generic.c | 1 +
>  3 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> index b8c2a3f..1eca4db 100644
> --- a/arch/arm64/include/asm/numa.h
> +++ b/arch/arm64/include/asm/numa.h
> @@ -15,9 +15,11 @@
>  extern int __node_distance(int from, int to);
>  #define node_distance(a, b) __node_distance(a, b)
>  
> -/* dummy definitions for pci functions */
> -#define pcibus_to_node(node)	0
> -#define cpumask_of_pcibus(bus)	0
> +struct pci_bus;
> +extern int pcibus_to_node(struct pci_bus *bus);
> +#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
> +				 cpu_all_mask :				\
> +				 cpumask_of_node(pcibus_to_node(bus)))

All the arch definitions of cpumask_of_pcibus() are pretty similar;
could they be made more generic?  At the very least, can you drop the
definition here and use the one in include/asm-generic/topology.h,
which is identical to what you're defining here?

>  extern int cpu_to_node_map[NR_CPUS];
>  extern nodemask_t numa_nodes_parsed __initdata;
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index b3d098b..37e2e9f 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -84,3 +84,11 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
>  	return NULL;
>  }
>  #endif
> +
> +#ifdef CONFIG_NUMA
> +int pcibus_to_node(struct pci_bus *bus)
> +{
> +	return dev_to_node(&bus->dev);
> +}
> +EXPORT_SYMBOL(pcibus_to_node);
> +#endif
> diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
> index 5434c90..a821e49 100644
> --- a/drivers/pci/host/pci-host-generic.c
> +++ b/drivers/pci/host/pci-host-generic.c
> @@ -230,6 +230,7 @@ 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->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-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-08 18:01   ` Bjorn Helgaas
  0 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-08 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> Adding helper functions and necessary code to make
> pci driver(pci-host-generic) numa aware.
> 
> This patch is on top of arm64-numa v7.
> http://www.spinics.net/lists/arm-kernel/msg460813.html
> 
> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> ---
>  arch/arm64/include/asm/numa.h       | 8 +++++---
>  arch/arm64/kernel/pci.c             | 8 ++++++++
>  drivers/pci/host/pci-host-generic.c | 1 +
>  3 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> index b8c2a3f..1eca4db 100644
> --- a/arch/arm64/include/asm/numa.h
> +++ b/arch/arm64/include/asm/numa.h
> @@ -15,9 +15,11 @@
>  extern int __node_distance(int from, int to);
>  #define node_distance(a, b) __node_distance(a, b)
>  
> -/* dummy definitions for pci functions */
> -#define pcibus_to_node(node)	0
> -#define cpumask_of_pcibus(bus)	0
> +struct pci_bus;
> +extern int pcibus_to_node(struct pci_bus *bus);
> +#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
> +				 cpu_all_mask :				\
> +				 cpumask_of_node(pcibus_to_node(bus)))

All the arch definitions of cpumask_of_pcibus() are pretty similar;
could they be made more generic?  At the very least, can you drop the
definition here and use the one in include/asm-generic/topology.h,
which is identical to what you're defining here?

>  extern int cpu_to_node_map[NR_CPUS];
>  extern nodemask_t numa_nodes_parsed __initdata;
> diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> index b3d098b..37e2e9f 100644
> --- a/arch/arm64/kernel/pci.c
> +++ b/arch/arm64/kernel/pci.c
> @@ -84,3 +84,11 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
>  	return NULL;
>  }
>  #endif
> +
> +#ifdef CONFIG_NUMA
> +int pcibus_to_node(struct pci_bus *bus)
> +{
> +	return dev_to_node(&bus->dev);
> +}
> +EXPORT_SYMBOL(pcibus_to_node);
> +#endif
> diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
> index 5434c90..a821e49 100644
> --- a/drivers/pci/host/pci-host-generic.c
> +++ b/drivers/pci/host/pci-host-generic.c
> @@ -230,6 +230,7 @@ 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->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-pci" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-08 18:01   ` Bjorn Helgaas
@ 2016-01-08 18:06     ` Will Deacon
  -1 siblings, 0 replies; 24+ messages in thread
From: Will Deacon @ 2016-01-08 18:06 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Ganapatrao Kulkarni, linux-arm-kernel, linux-kernel, linux-pci,
	catalin.marinas, bhelgaas, hanjun.guo, rrichter, Prasun.Kapoor,
	gpkulkarni

On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> > Adding helper functions and necessary code to make
> > pci driver(pci-host-generic) numa aware.
> > 
> > This patch is on top of arm64-numa v7.
> > http://www.spinics.net/lists/arm-kernel/msg460813.html
> > 
> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> > ---
> >  arch/arm64/include/asm/numa.h       | 8 +++++---
> >  arch/arm64/kernel/pci.c             | 8 ++++++++
> >  drivers/pci/host/pci-host-generic.c | 1 +
> >  3 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> > index b8c2a3f..1eca4db 100644
> > --- a/arch/arm64/include/asm/numa.h
> > +++ b/arch/arm64/include/asm/numa.h
> > @@ -15,9 +15,11 @@
> >  extern int __node_distance(int from, int to);
> >  #define node_distance(a, b) __node_distance(a, b)
> >  
> > -/* dummy definitions for pci functions */
> > -#define pcibus_to_node(node)	0
> > -#define cpumask_of_pcibus(bus)	0
> > +struct pci_bus;
> > +extern int pcibus_to_node(struct pci_bus *bus);
> > +#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
> > +				 cpu_all_mask :				\
> > +				 cpumask_of_node(pcibus_to_node(bus)))
> 
> All the arch definitions of cpumask_of_pcibus() are pretty similar;
> could they be made more generic?  At the very least, can you drop the
> definition here and use the one in include/asm-generic/topology.h,
> which is identical to what you're defining here?

+1 on that. I asked for exactly the same thing in my review of v7:

  http://www.spinics.net/lists/arm-kernel/msg469592.html

but it looks like I was just ignored.

Will

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-08 18:06     ` Will Deacon
  0 siblings, 0 replies; 24+ messages in thread
From: Will Deacon @ 2016-01-08 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> > Adding helper functions and necessary code to make
> > pci driver(pci-host-generic) numa aware.
> > 
> > This patch is on top of arm64-numa v7.
> > http://www.spinics.net/lists/arm-kernel/msg460813.html
> > 
> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> > ---
> >  arch/arm64/include/asm/numa.h       | 8 +++++---
> >  arch/arm64/kernel/pci.c             | 8 ++++++++
> >  drivers/pci/host/pci-host-generic.c | 1 +
> >  3 files changed, 14 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> > index b8c2a3f..1eca4db 100644
> > --- a/arch/arm64/include/asm/numa.h
> > +++ b/arch/arm64/include/asm/numa.h
> > @@ -15,9 +15,11 @@
> >  extern int __node_distance(int from, int to);
> >  #define node_distance(a, b) __node_distance(a, b)
> >  
> > -/* dummy definitions for pci functions */
> > -#define pcibus_to_node(node)	0
> > -#define cpumask_of_pcibus(bus)	0
> > +struct pci_bus;
> > +extern int pcibus_to_node(struct pci_bus *bus);
> > +#define cpumask_of_pcibus(bus)	(pcibus_to_node(bus) == -1 ?		\
> > +				 cpu_all_mask :				\
> > +				 cpumask_of_node(pcibus_to_node(bus)))
> 
> All the arch definitions of cpumask_of_pcibus() are pretty similar;
> could they be made more generic?  At the very least, can you drop the
> definition here and use the one in include/asm-generic/topology.h,
> which is identical to what you're defining here?

+1 on that. I asked for exactly the same thing in my review of v7:

  http://www.spinics.net/lists/arm-kernel/msg469592.html

but it looks like I was just ignored.

Will

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-08 18:06     ` Will Deacon
  (?)
@ 2016-01-09  6:05       ` Ganapatrao Kulkarni
  -1 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09  6:05 UTC (permalink / raw)
  To: Will Deacon
  Cc: Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel,
	linux-kernel, linux-pci, Catalin Marinas, Bjorn Helgaas,
	Hanjun Guo, Robert Richter, Prasun Kapoor

On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> > Adding helper functions and necessary code to make
>> > pci driver(pci-host-generic) numa aware.
>> >
>> > This patch is on top of arm64-numa v7.
>> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >
>> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> > ---
>> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> > index b8c2a3f..1eca4db 100644
>> > --- a/arch/arm64/include/asm/numa.h
>> > +++ b/arch/arm64/include/asm/numa.h
>> > @@ -15,9 +15,11 @@
>> >  extern int __node_distance(int from, int to);
>> >  #define node_distance(a, b) __node_distance(a, b)
>> >
>> > -/* dummy definitions for pci functions */
>> > -#define pcibus_to_node(node)       0
>> > -#define cpumask_of_pcibus(bus)     0
>> > +struct pci_bus;
>> > +extern int pcibus_to_node(struct pci_bus *bus);
>> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> > +                            cpu_all_mask :                         \
>> > +                            cpumask_of_node(pcibus_to_node(bus)))
>>
>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> could they be made more generic?  At the very least, can you drop the
>> definition here and use the one in include/asm-generic/topology.h,
>> which is identical to what you're defining here?
macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
include/asm-generic/topology.h
and this macro is defined again for NUMA in respective arch header files.
i think moving this macro from ifndef will allow us to use without redefinition.

--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -54,14 +54,14 @@
 #define pcibus_to_node(bus)    ((void)(bus), -1)
 #endif

+#endif /* CONFIG_NUMA */
+
 #ifndef cpumask_of_pcibus
 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
                                 cpu_all_mask :                         \
                                 cpumask_of_node(pcibus_to_node(bus)))
 #endif

-#endif /* CONFIG_NUMA */
-
 #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)

 #ifndef set_numa_mem

i have got below compilation error withour macro defined in arch code.

drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
cc1: some warnings being treated as errors


i can send this as separate patch( as a  fix patch).

>
> +1 on that. I asked for exactly the same thing in my review of v7:
>
>   http://www.spinics.net/lists/arm-kernel/msg469592.html
>
> but it looks like I was just ignored.
>
> Will
thanks
ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09  6:05       ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09  6:05 UTC (permalink / raw)
  To: Will Deacon
  Cc: Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel,
	linux-kernel, linux-pci, Catalin Marinas, Bjorn Helgaas,
	Hanjun Guo, Robert Richter, Prasun Kapoor

On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> > Adding helper functions and necessary code to make
>> > pci driver(pci-host-generic) numa aware.
>> >
>> > This patch is on top of arm64-numa v7.
>> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >
>> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> > ---
>> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> > index b8c2a3f..1eca4db 100644
>> > --- a/arch/arm64/include/asm/numa.h
>> > +++ b/arch/arm64/include/asm/numa.h
>> > @@ -15,9 +15,11 @@
>> >  extern int __node_distance(int from, int to);
>> >  #define node_distance(a, b) __node_distance(a, b)
>> >
>> > -/* dummy definitions for pci functions */
>> > -#define pcibus_to_node(node)       0
>> > -#define cpumask_of_pcibus(bus)     0
>> > +struct pci_bus;
>> > +extern int pcibus_to_node(struct pci_bus *bus);
>> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> > +                            cpu_all_mask :                         \
>> > +                            cpumask_of_node(pcibus_to_node(bus)))
>>
>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> could they be made more generic?  At the very least, can you drop the
>> definition here and use the one in include/asm-generic/topology.h,
>> which is identical to what you're defining here?
macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
include/asm-generic/topology.h
and this macro is defined again for NUMA in respective arch header files.
i think moving this macro from ifndef will allow us to use without redefinition.

--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -54,14 +54,14 @@
 #define pcibus_to_node(bus)    ((void)(bus), -1)
 #endif

+#endif /* CONFIG_NUMA */
+
 #ifndef cpumask_of_pcibus
 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
                                 cpu_all_mask :                         \
                                 cpumask_of_node(pcibus_to_node(bus)))
 #endif

-#endif /* CONFIG_NUMA */
-
 #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)

 #ifndef set_numa_mem

i have got below compilation error withour macro defined in arch code.

drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
cc1: some warnings being treated as errors


i can send this as separate patch( as a  fix patch).

>
> +1 on that. I asked for exactly the same thing in my review of v7:
>
>   http://www.spinics.net/lists/arm-kernel/msg469592.html
>
> but it looks like I was just ignored.
>
> Will
thanks
ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09  6:05       ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09  6:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> > Adding helper functions and necessary code to make
>> > pci driver(pci-host-generic) numa aware.
>> >
>> > This patch is on top of arm64-numa v7.
>> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >
>> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> > ---
>> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> > index b8c2a3f..1eca4db 100644
>> > --- a/arch/arm64/include/asm/numa.h
>> > +++ b/arch/arm64/include/asm/numa.h
>> > @@ -15,9 +15,11 @@
>> >  extern int __node_distance(int from, int to);
>> >  #define node_distance(a, b) __node_distance(a, b)
>> >
>> > -/* dummy definitions for pci functions */
>> > -#define pcibus_to_node(node)       0
>> > -#define cpumask_of_pcibus(bus)     0
>> > +struct pci_bus;
>> > +extern int pcibus_to_node(struct pci_bus *bus);
>> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> > +                            cpu_all_mask :                         \
>> > +                            cpumask_of_node(pcibus_to_node(bus)))
>>
>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> could they be made more generic?  At the very least, can you drop the
>> definition here and use the one in include/asm-generic/topology.h,
>> which is identical to what you're defining here?
macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
include/asm-generic/topology.h
and this macro is defined again for NUMA in respective arch header files.
i think moving this macro from ifndef will allow us to use without redefinition.

--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -54,14 +54,14 @@
 #define pcibus_to_node(bus)    ((void)(bus), -1)
 #endif

+#endif /* CONFIG_NUMA */
+
 #ifndef cpumask_of_pcibus
 #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
                                 cpu_all_mask :                         \
                                 cpumask_of_node(pcibus_to_node(bus)))
 #endif

-#endif /* CONFIG_NUMA */
-
 #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)

 #ifndef set_numa_mem

i have got below compilation error withour macro defined in arch code.

drivers/pci/pci-sysfs.c: In function ?cpuaffinity_show?:
drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
function ?cpumask_of_pcibus? [-Werror=implicit-function-declaration]
drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
drivers/pci/pci-sysfs.c: In function ?cpulistaffinity_show?:
drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
from integer without a cast [enabled by default]
cc1: some warnings being treated as errors


i can send this as separate patch( as a  fix patch).

>
> +1 on that. I asked for exactly the same thing in my review of v7:
>
>   http://www.spinics.net/lists/arm-kernel/msg469592.html
>
> but it looks like I was just ignored.
>
> Will
thanks
ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-09  6:05       ` Ganapatrao Kulkarni
  (?)
@ 2016-01-09 15:24         ` Bjorn Helgaas
  -1 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-09 15:24 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Will Deacon, Ganapatrao Kulkarni, linux-arm-kernel, linux-kernel,
	linux-pci, Catalin Marinas, Bjorn Helgaas, Hanjun Guo,
	Robert Richter, Prasun Kapoor

On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >> > Adding helper functions and necessary code to make
> >> > pci driver(pci-host-generic) numa aware.
> >> >
> >> > This patch is on top of arm64-numa v7.
> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
> >> >
> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >> > ---
> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
> >> >  drivers/pci/host/pci-host-generic.c | 1 +
> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> >> > index b8c2a3f..1eca4db 100644
> >> > --- a/arch/arm64/include/asm/numa.h
> >> > +++ b/arch/arm64/include/asm/numa.h
> >> > @@ -15,9 +15,11 @@
> >> >  extern int __node_distance(int from, int to);
> >> >  #define node_distance(a, b) __node_distance(a, b)
> >> >
> >> > -/* dummy definitions for pci functions */
> >> > -#define pcibus_to_node(node)       0
> >> > -#define cpumask_of_pcibus(bus)     0
> >> > +struct pci_bus;
> >> > +extern int pcibus_to_node(struct pci_bus *bus);
> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
> >> > +                            cpu_all_mask :                         \
> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
> >>
> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
> >> could they be made more generic?  At the very least, can you drop the
> >> definition here and use the one in include/asm-generic/topology.h,
> >> which is identical to what you're defining here?
> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
> include/asm-generic/topology.h
> and this macro is defined again for NUMA in respective arch header files.
> i think moving this macro from ifndef will allow us to use without redefinition.
> 
> --- a/include/asm-generic/topology.h
> +++ b/include/asm-generic/topology.h
> @@ -54,14 +54,14 @@
>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>  #endif
> 
> +#endif /* CONFIG_NUMA */
> +
>  #ifndef cpumask_of_pcibus
>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>                                  cpu_all_mask :                         \
>                                  cpumask_of_node(pcibus_to_node(bus)))
>  #endif
> 
> -#endif /* CONFIG_NUMA */
> -
>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
> 
>  #ifndef set_numa_mem
> 
> i have got below compilation error withour macro defined in arch code.
> 
> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> cc1: some warnings being treated as errors
> 
> 
> i can send this as separate patch( as a  fix patch).

Unless your series has already been merged, I don't like the idea of a
separate fix patch.  The whole point of reviews is to try to fix as
many things as we can *before* merging.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09 15:24         ` Bjorn Helgaas
  0 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-09 15:24 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Will Deacon, Ganapatrao Kulkarni, linux-arm-kernel, linux-kernel,
	linux-pci, Catalin Marinas, Bjorn Helgaas, Hanjun Guo,
	Robert Richter, Prasun Kapoor

On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >> > Adding helper functions and necessary code to make
> >> > pci driver(pci-host-generic) numa aware.
> >> >
> >> > This patch is on top of arm64-numa v7.
> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
> >> >
> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >> > ---
> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
> >> >  drivers/pci/host/pci-host-generic.c | 1 +
> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> >> > index b8c2a3f..1eca4db 100644
> >> > --- a/arch/arm64/include/asm/numa.h
> >> > +++ b/arch/arm64/include/asm/numa.h
> >> > @@ -15,9 +15,11 @@
> >> >  extern int __node_distance(int from, int to);
> >> >  #define node_distance(a, b) __node_distance(a, b)
> >> >
> >> > -/* dummy definitions for pci functions */
> >> > -#define pcibus_to_node(node)       0
> >> > -#define cpumask_of_pcibus(bus)     0
> >> > +struct pci_bus;
> >> > +extern int pcibus_to_node(struct pci_bus *bus);
> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
> >> > +                            cpu_all_mask :                         \
> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
> >>
> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
> >> could they be made more generic?  At the very least, can you drop the
> >> definition here and use the one in include/asm-generic/topology.h,
> >> which is identical to what you're defining here?
> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
> include/asm-generic/topology.h
> and this macro is defined again for NUMA in respective arch header files.
> i think moving this macro from ifndef will allow us to use without redefinition.
> 
> --- a/include/asm-generic/topology.h
> +++ b/include/asm-generic/topology.h
> @@ -54,14 +54,14 @@
>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>  #endif
> 
> +#endif /* CONFIG_NUMA */
> +
>  #ifndef cpumask_of_pcibus
>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>                                  cpu_all_mask :                         \
>                                  cpumask_of_node(pcibus_to_node(bus)))
>  #endif
> 
> -#endif /* CONFIG_NUMA */
> -
>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
> 
>  #ifndef set_numa_mem
> 
> i have got below compilation error withour macro defined in arch code.
> 
> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> cc1: some warnings being treated as errors
> 
> 
> i can send this as separate patch( as a  fix patch).

Unless your series has already been merged, I don't like the idea of a
separate fix patch.  The whole point of reviews is to try to fix as
many things as we can *before* merging.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09 15:24         ` Bjorn Helgaas
  0 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-09 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >> > Adding helper functions and necessary code to make
> >> > pci driver(pci-host-generic) numa aware.
> >> >
> >> > This patch is on top of arm64-numa v7.
> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
> >> >
> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >> > ---
> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
> >> >  drivers/pci/host/pci-host-generic.c | 1 +
> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
> >> >
> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
> >> > index b8c2a3f..1eca4db 100644
> >> > --- a/arch/arm64/include/asm/numa.h
> >> > +++ b/arch/arm64/include/asm/numa.h
> >> > @@ -15,9 +15,11 @@
> >> >  extern int __node_distance(int from, int to);
> >> >  #define node_distance(a, b) __node_distance(a, b)
> >> >
> >> > -/* dummy definitions for pci functions */
> >> > -#define pcibus_to_node(node)       0
> >> > -#define cpumask_of_pcibus(bus)     0
> >> > +struct pci_bus;
> >> > +extern int pcibus_to_node(struct pci_bus *bus);
> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
> >> > +                            cpu_all_mask :                         \
> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
> >>
> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
> >> could they be made more generic?  At the very least, can you drop the
> >> definition here and use the one in include/asm-generic/topology.h,
> >> which is identical to what you're defining here?
> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
> include/asm-generic/topology.h
> and this macro is defined again for NUMA in respective arch header files.
> i think moving this macro from ifndef will allow us to use without redefinition.
> 
> --- a/include/asm-generic/topology.h
> +++ b/include/asm-generic/topology.h
> @@ -54,14 +54,14 @@
>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>  #endif
> 
> +#endif /* CONFIG_NUMA */
> +
>  #ifndef cpumask_of_pcibus
>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>                                  cpu_all_mask :                         \
>                                  cpumask_of_node(pcibus_to_node(bus)))
>  #endif
> 
> -#endif /* CONFIG_NUMA */
> -
>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
> 
>  #ifndef set_numa_mem
> 
> i have got below compilation error withour macro defined in arch code.
> 
> drivers/pci/pci-sysfs.c: In function ?cpuaffinity_show?:
> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
> function ?cpumask_of_pcibus? [-Werror=implicit-function-declaration]
> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> drivers/pci/pci-sysfs.c: In function ?cpulistaffinity_show?:
> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
> from integer without a cast [enabled by default]
> cc1: some warnings being treated as errors
> 
> 
> i can send this as separate patch( as a  fix patch).

Unless your series has already been merged, I don't like the idea of a
separate fix patch.  The whole point of reviews is to try to fix as
many things as we can *before* merging.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-09 15:24         ` Bjorn Helgaas
  (?)
@ 2016-01-09 15:35           ` Ganapatrao Kulkarni
  -1 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09 15:35 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Will Deacon, Ganapatrao Kulkarni, linux-arm-kernel, linux-kernel,
	linux-pci, Catalin Marinas, Bjorn Helgaas, Hanjun Guo,
	Robert Richter, Prasun Kapoor

Hi Bjorn,

On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> >> > Adding helper functions and necessary code to make
>> >> > pci driver(pci-host-generic) numa aware.
>> >> >
>> >> > This patch is on top of arm64-numa v7.
>> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >> >
>> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> >> > ---
>> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> >> > index b8c2a3f..1eca4db 100644
>> >> > --- a/arch/arm64/include/asm/numa.h
>> >> > +++ b/arch/arm64/include/asm/numa.h
>> >> > @@ -15,9 +15,11 @@
>> >> >  extern int __node_distance(int from, int to);
>> >> >  #define node_distance(a, b) __node_distance(a, b)
>> >> >
>> >> > -/* dummy definitions for pci functions */
>> >> > -#define pcibus_to_node(node)       0
>> >> > -#define cpumask_of_pcibus(bus)     0
>> >> > +struct pci_bus;
>> >> > +extern int pcibus_to_node(struct pci_bus *bus);
>> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> >> > +                            cpu_all_mask :                         \
>> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
>> >>
>> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> >> could they be made more generic?  At the very least, can you drop the
>> >> definition here and use the one in include/asm-generic/topology.h,
>> >> which is identical to what you're defining here?
>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>> include/asm-generic/topology.h
>> and this macro is defined again for NUMA in respective arch header files.
>> i think moving this macro from ifndef will allow us to use without redefinition.
>>
>> --- a/include/asm-generic/topology.h
>> +++ b/include/asm-generic/topology.h
>> @@ -54,14 +54,14 @@
>>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>>  #endif
>>
>> +#endif /* CONFIG_NUMA */
>> +
>>  #ifndef cpumask_of_pcibus
>>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>                                  cpu_all_mask :                         \
>>                                  cpumask_of_node(pcibus_to_node(bus)))
>>  #endif
>>
>> -#endif /* CONFIG_NUMA */
>> -
>>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>
>>  #ifndef set_numa_mem
>>
>> i have got below compilation error withour macro defined in arch code.
>>
>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> cc1: some warnings being treated as errors
>>
>>
>> i can send this as separate patch( as a  fix patch).
>
> Unless your series has already been merged, I don't like the idea of a
> separate fix patch.  The whole point of reviews is to try to fix as
> many things as we can *before* merging.
thanks for the review.
sure, i will add  this as part of my numa patch series.
>
> Bjorn

thanks
Ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09 15:35           ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09 15:35 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Will Deacon, Ganapatrao Kulkarni, linux-arm-kernel, linux-kernel,
	linux-pci, Catalin Marinas, Bjorn Helgaas, Hanjun Guo,
	Robert Richter, Prasun Kapoor

Hi Bjorn,

On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> >> > Adding helper functions and necessary code to make
>> >> > pci driver(pci-host-generic) numa aware.
>> >> >
>> >> > This patch is on top of arm64-numa v7.
>> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >> >
>> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> >> > ---
>> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> >> > index b8c2a3f..1eca4db 100644
>> >> > --- a/arch/arm64/include/asm/numa.h
>> >> > +++ b/arch/arm64/include/asm/numa.h
>> >> > @@ -15,9 +15,11 @@
>> >> >  extern int __node_distance(int from, int to);
>> >> >  #define node_distance(a, b) __node_distance(a, b)
>> >> >
>> >> > -/* dummy definitions for pci functions */
>> >> > -#define pcibus_to_node(node)       0
>> >> > -#define cpumask_of_pcibus(bus)     0
>> >> > +struct pci_bus;
>> >> > +extern int pcibus_to_node(struct pci_bus *bus);
>> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> >> > +                            cpu_all_mask :                         \
>> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
>> >>
>> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> >> could they be made more generic?  At the very least, can you drop the
>> >> definition here and use the one in include/asm-generic/topology.h,
>> >> which is identical to what you're defining here?
>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>> include/asm-generic/topology.h
>> and this macro is defined again for NUMA in respective arch header files.
>> i think moving this macro from ifndef will allow us to use without redefinition.
>>
>> --- a/include/asm-generic/topology.h
>> +++ b/include/asm-generic/topology.h
>> @@ -54,14 +54,14 @@
>>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>>  #endif
>>
>> +#endif /* CONFIG_NUMA */
>> +
>>  #ifndef cpumask_of_pcibus
>>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>                                  cpu_all_mask :                         \
>>                                  cpumask_of_node(pcibus_to_node(bus)))
>>  #endif
>>
>> -#endif /* CONFIG_NUMA */
>> -
>>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>
>>  #ifndef set_numa_mem
>>
>> i have got below compilation error withour macro defined in arch code.
>>
>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> cc1: some warnings being treated as errors
>>
>>
>> i can send this as separate patch( as a  fix patch).
>
> Unless your series has already been merged, I don't like the idea of a
> separate fix patch.  The whole point of reviews is to try to fix as
> many things as we can *before* merging.
thanks for the review.
sure, i will add  this as part of my numa patch series.
>
> Bjorn

thanks
Ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-09 15:35           ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-09 15:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn,

On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>> > On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>> >> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>> >> > Adding helper functions and necessary code to make
>> >> > pci driver(pci-host-generic) numa aware.
>> >> >
>> >> > This patch is on top of arm64-numa v7.
>> >> > http://www.spinics.net/lists/arm-kernel/msg460813.html
>> >> >
>> >> > Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>> >> > ---
>> >> >  arch/arm64/include/asm/numa.h       | 8 +++++---
>> >> >  arch/arm64/kernel/pci.c             | 8 ++++++++
>> >> >  drivers/pci/host/pci-host-generic.c | 1 +
>> >> >  3 files changed, 14 insertions(+), 3 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>> >> > index b8c2a3f..1eca4db 100644
>> >> > --- a/arch/arm64/include/asm/numa.h
>> >> > +++ b/arch/arm64/include/asm/numa.h
>> >> > @@ -15,9 +15,11 @@
>> >> >  extern int __node_distance(int from, int to);
>> >> >  #define node_distance(a, b) __node_distance(a, b)
>> >> >
>> >> > -/* dummy definitions for pci functions */
>> >> > -#define pcibus_to_node(node)       0
>> >> > -#define cpumask_of_pcibus(bus)     0
>> >> > +struct pci_bus;
>> >> > +extern int pcibus_to_node(struct pci_bus *bus);
>> >> > +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>> >> > +                            cpu_all_mask :                         \
>> >> > +                            cpumask_of_node(pcibus_to_node(bus)))
>> >>
>> >> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>> >> could they be made more generic?  At the very least, can you drop the
>> >> definition here and use the one in include/asm-generic/topology.h,
>> >> which is identical to what you're defining here?
>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>> include/asm-generic/topology.h
>> and this macro is defined again for NUMA in respective arch header files.
>> i think moving this macro from ifndef will allow us to use without redefinition.
>>
>> --- a/include/asm-generic/topology.h
>> +++ b/include/asm-generic/topology.h
>> @@ -54,14 +54,14 @@
>>  #define pcibus_to_node(bus)    ((void)(bus), -1)
>>  #endif
>>
>> +#endif /* CONFIG_NUMA */
>> +
>>  #ifndef cpumask_of_pcibus
>>  #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>                                  cpu_all_mask :                         \
>>                                  cpumask_of_node(pcibus_to_node(bus)))
>>  #endif
>>
>> -#endif /* CONFIG_NUMA */
>> -
>>  #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>
>>  #ifndef set_numa_mem
>>
>> i have got below compilation error withour macro defined in arch code.
>>
>> drivers/pci/pci-sysfs.c: In function ?cpuaffinity_show?:
>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>> function ?cpumask_of_pcibus? [-Werror=implicit-function-declaration]
>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> drivers/pci/pci-sysfs.c: In function ?cpulistaffinity_show?:
>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>> from integer without a cast [enabled by default]
>> cc1: some warnings being treated as errors
>>
>>
>> i can send this as separate patch( as a  fix patch).
>
> Unless your series has already been merged, I don't like the idea of a
> separate fix patch.  The whole point of reviews is to try to fix as
> many things as we can *before* merging.
thanks for the review.
sure, i will add  this as part of my numa patch series.
>
> Bjorn

thanks
Ganapat

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-09 15:35           ` Ganapatrao Kulkarni
  (?)
@ 2016-01-11 17:12             ` Matthias Brugger
  -1 siblings, 0 replies; 24+ messages in thread
From: Matthias Brugger @ 2016-01-11 17:12 UTC (permalink / raw)
  To: Ganapatrao Kulkarni, Bjorn Helgaas
  Cc: Prasun Kapoor, linux-pci, Will Deacon, linux-kernel,
	Robert Richter, Hanjun Guo, Catalin Marinas, Bjorn Helgaas,
	Ganapatrao Kulkarni, linux-arm-kernel



On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> Hi Bjorn,
>
> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>> Adding helper functions and necessary code to make
>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>
>>>>>> This patch is on top of arm64-numa v7.
>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>
>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>> ---
>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +

set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
Was this forgotten?

Regards,
Matthias

>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>>>>>> index b8c2a3f..1eca4db 100644
>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>> @@ -15,9 +15,11 @@
>>>>>>   extern int __node_distance(int from, int to);
>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>
>>>>>> -/* dummy definitions for pci functions */
>>>>>> -#define pcibus_to_node(node)       0
>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>> +struct pci_bus;
>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>>>>>> +                            cpu_all_mask :                         \
>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>
>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>> could they be made more generic?  At the very least, can you drop the
>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>> which is identical to what you're defining here?
>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>> include/asm-generic/topology.h
>>> and this macro is defined again for NUMA in respective arch header files.
>>> i think moving this macro from ifndef will allow us to use without redefinition.
>>>
>>> --- a/include/asm-generic/topology.h
>>> +++ b/include/asm-generic/topology.h
>>> @@ -54,14 +54,14 @@
>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>   #endif
>>>
>>> +#endif /* CONFIG_NUMA */
>>> +
>>>   #ifndef cpumask_of_pcibus
>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>>                                   cpu_all_mask :                         \
>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>   #endif
>>>
>>> -#endif /* CONFIG_NUMA */
>>> -
>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>
>>>   #ifndef set_numa_mem
>>>
>>> i have got below compilation error withour macro defined in arch code.
>>>
>>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> cc1: some warnings being treated as errors
>>>
>>>
>>> i can send this as separate patch( as a  fix patch).
>>
>> Unless your series has already been merged, I don't like the idea of a
>> separate fix patch.  The whole point of reviews is to try to fix as
>> many things as we can *before* merging.
> thanks for the review.
> sure, i will add  this as part of my numa patch series.
>>
>> Bjorn
>
> thanks
> Ganapat
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-11 17:12             ` Matthias Brugger
  0 siblings, 0 replies; 24+ messages in thread
From: Matthias Brugger @ 2016-01-11 17:12 UTC (permalink / raw)
  To: Ganapatrao Kulkarni, Bjorn Helgaas
  Cc: Prasun Kapoor, linux-pci, Will Deacon, linux-kernel,
	Robert Richter, Hanjun Guo, Catalin Marinas, Bjorn Helgaas,
	Ganapatrao Kulkarni, linux-arm-kernel



On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> Hi Bjorn,
>
> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>> Adding helper functions and necessary code to make
>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>
>>>>>> This patch is on top of arm64-numa v7.
>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>
>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>> ---
>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +

set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
Was this forgotten?

Regards,
Matthias

>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>>>>>> index b8c2a3f..1eca4db 100644
>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>> @@ -15,9 +15,11 @@
>>>>>>   extern int __node_distance(int from, int to);
>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>
>>>>>> -/* dummy definitions for pci functions */
>>>>>> -#define pcibus_to_node(node)       0
>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>> +struct pci_bus;
>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>>>>>> +                            cpu_all_mask :                         \
>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>
>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>> could they be made more generic?  At the very least, can you drop the
>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>> which is identical to what you're defining here?
>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>> include/asm-generic/topology.h
>>> and this macro is defined again for NUMA in respective arch header files.
>>> i think moving this macro from ifndef will allow us to use without redefinition.
>>>
>>> --- a/include/asm-generic/topology.h
>>> +++ b/include/asm-generic/topology.h
>>> @@ -54,14 +54,14 @@
>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>   #endif
>>>
>>> +#endif /* CONFIG_NUMA */
>>> +
>>>   #ifndef cpumask_of_pcibus
>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>>                                   cpu_all_mask :                         \
>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>   #endif
>>>
>>> -#endif /* CONFIG_NUMA */
>>> -
>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>
>>>   #ifndef set_numa_mem
>>>
>>> i have got below compilation error withour macro defined in arch code.
>>>
>>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> cc1: some warnings being treated as errors
>>>
>>>
>>> i can send this as separate patch( as a  fix patch).
>>
>> Unless your series has already been merged, I don't like the idea of a
>> separate fix patch.  The whole point of reviews is to try to fix as
>> many things as we can *before* merging.
> thanks for the review.
> sure, i will add  this as part of my numa patch series.
>>
>> Bjorn
>
> thanks
> Ganapat
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-11 17:12             ` Matthias Brugger
  0 siblings, 0 replies; 24+ messages in thread
From: Matthias Brugger @ 2016-01-11 17:12 UTC (permalink / raw)
  To: linux-arm-kernel



On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> Hi Bjorn,
>
> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com> wrote:
>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>> Adding helper functions and necessary code to make
>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>
>>>>>> This patch is on top of arm64-numa v7.
>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>
>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>> ---
>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +

set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
Was this forgotten?

Regards,
Matthias

>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/arch/arm64/include/asm/numa.h b/arch/arm64/include/asm/numa.h
>>>>>> index b8c2a3f..1eca4db 100644
>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>> @@ -15,9 +15,11 @@
>>>>>>   extern int __node_distance(int from, int to);
>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>
>>>>>> -/* dummy definitions for pci functions */
>>>>>> -#define pcibus_to_node(node)       0
>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>> +struct pci_bus;
>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?            \
>>>>>> +                            cpu_all_mask :                         \
>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>
>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>> could they be made more generic?  At the very least, can you drop the
>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>> which is identical to what you're defining here?
>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>> include/asm-generic/topology.h
>>> and this macro is defined again for NUMA in respective arch header files.
>>> i think moving this macro from ifndef will allow us to use without redefinition.
>>>
>>> --- a/include/asm-generic/topology.h
>>> +++ b/include/asm-generic/topology.h
>>> @@ -54,14 +54,14 @@
>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>   #endif
>>>
>>> +#endif /* CONFIG_NUMA */
>>> +
>>>   #ifndef cpumask_of_pcibus
>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?            \
>>>                                   cpu_all_mask :                         \
>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>   #endif
>>>
>>> -#endif /* CONFIG_NUMA */
>>> -
>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>
>>>   #ifndef set_numa_mem
>>>
>>> i have got below compilation error withour macro defined in arch code.
>>>
>>> drivers/pci/pci-sysfs.c: In function ?cpuaffinity_show?:
>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>> function ?cpumask_of_pcibus? [-Werror=implicit-function-declaration]
>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> drivers/pci/pci-sysfs.c: In function ?cpulistaffinity_show?:
>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>> from integer without a cast [enabled by default]
>>> cc1: some warnings being treated as errors
>>>
>>>
>>> i can send this as separate patch( as a  fix patch).
>>
>> Unless your series has already been merged, I don't like the idea of a
>> separate fix patch.  The whole point of reviews is to try to fix as
>> many things as we can *before* merging.
> thanks for the review.
> sure, i will add  this as part of my numa patch series.
>>
>> Bjorn
>
> thanks
> Ganapat
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-11 17:12             ` Matthias Brugger
  (?)
@ 2016-01-11 17:26               ` Ganapatrao Kulkarni
  -1 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-11 17:26 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Bjorn Helgaas, Prasun Kapoor, linux-pci, Will Deacon,
	linux-kernel, Robert Richter, Hanjun Guo, Catalin Marinas,
	Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel

Hi Bjorn, Will,

On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
>
>
> On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
>>
>> Hi Bjorn,
>>
>> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>>>
>>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>>>
>>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
>>>> wrote:
>>>>>
>>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>>>
>>>>>>> Adding helper functions and necessary code to make
>>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>>
>>>>>>> This patch is on top of arm64-numa v7.
>>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>>
>>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>>> ---
>>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
>
>
> set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> Was this forgotten?
i am not sure on adding numa required change(it is one line add) to
pci-host-generic.c in numa patchset itself.
Is it more appropriate to send as separate patch?
please suggest.


Thanks Matthias for your comment.
>
> Regards,
> Matthias
>
>>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> diff --git a/arch/arm64/include/asm/numa.h
>>>>>>> b/arch/arm64/include/asm/numa.h
>>>>>>> index b8c2a3f..1eca4db 100644
>>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>>> @@ -15,9 +15,11 @@
>>>>>>>   extern int __node_distance(int from, int to);
>>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>>
>>>>>>> -/* dummy definitions for pci functions */
>>>>>>> -#define pcibus_to_node(node)       0
>>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>>> +struct pci_bus;
>>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?
>>>>>>> \
>>>>>>> +                            cpu_all_mask :                         \
>>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>>
>>>>>>
>>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>>> could they be made more generic?  At the very least, can you drop the
>>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>>> which is identical to what you're defining here?
>>>>
>>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>>> include/asm-generic/topology.h
>>>> and this macro is defined again for NUMA in respective arch header
>>>> files.
>>>> i think moving this macro from ifndef will allow us to use without
>>>> redefinition.
>>>>
>>>> --- a/include/asm-generic/topology.h
>>>> +++ b/include/asm-generic/topology.h
>>>> @@ -54,14 +54,14 @@
>>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>>   #endif
>>>>
>>>> +#endif /* CONFIG_NUMA */
>>>> +
>>>>   #ifndef cpumask_of_pcibus
>>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?
>>>> \
>>>>                                   cpu_all_mask :
>>>> \
>>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>>   #endif
>>>>
>>>> -#endif /* CONFIG_NUMA */
>>>> -
>>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>>
>>>>   #ifndef set_numa_mem
>>>>
>>>> i have got below compilation error withour macro defined in arch code.
>>>>
>>>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> cc1: some warnings being treated as errors
>>>>
>>>>
>>>> i can send this as separate patch( as a  fix patch).
>>>
>>>
>>> Unless your series has already been merged, I don't like the idea of a
>>> separate fix patch.  The whole point of reviews is to try to fix as
>>> many things as we can *before* merging.
>>
>> thanks for the review.
>> sure, i will add  this as part of my numa patch series.
>>>
>>>
>>> Bjorn
>>
>>
>> thanks
>> Ganapat
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-11 17:26               ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-11 17:26 UTC (permalink / raw)
  To: Matthias Brugger
  Cc: Bjorn Helgaas, Prasun Kapoor, linux-pci, Will Deacon,
	linux-kernel, Robert Richter, Hanjun Guo, Catalin Marinas,
	Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel

Hi Bjorn, Will,

On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
>
>
> On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
>>
>> Hi Bjorn,
>>
>> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>>>
>>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>>>
>>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
>>>> wrote:
>>>>>
>>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>>>
>>>>>>> Adding helper functions and necessary code to make
>>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>>
>>>>>>> This patch is on top of arm64-numa v7.
>>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>>
>>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>>> ---
>>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
>
>
> set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> Was this forgotten?
i am not sure on adding numa required change(it is one line add) to
pci-host-generic.c in numa patchset itself.
Is it more appropriate to send as separate patch?
please suggest.


Thanks Matthias for your comment.
>
> Regards,
> Matthias
>
>>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> diff --git a/arch/arm64/include/asm/numa.h
>>>>>>> b/arch/arm64/include/asm/numa.h
>>>>>>> index b8c2a3f..1eca4db 100644
>>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>>> @@ -15,9 +15,11 @@
>>>>>>>   extern int __node_distance(int from, int to);
>>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>>
>>>>>>> -/* dummy definitions for pci functions */
>>>>>>> -#define pcibus_to_node(node)       0
>>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>>> +struct pci_bus;
>>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?
>>>>>>> \
>>>>>>> +                            cpu_all_mask :                         \
>>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>>
>>>>>>
>>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>>> could they be made more generic?  At the very least, can you drop the
>>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>>> which is identical to what you're defining here?
>>>>
>>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>>> include/asm-generic/topology.h
>>>> and this macro is defined again for NUMA in respective arch header
>>>> files.
>>>> i think moving this macro from ifndef will allow us to use without
>>>> redefinition.
>>>>
>>>> --- a/include/asm-generic/topology.h
>>>> +++ b/include/asm-generic/topology.h
>>>> @@ -54,14 +54,14 @@
>>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>>   #endif
>>>>
>>>> +#endif /* CONFIG_NUMA */
>>>> +
>>>>   #ifndef cpumask_of_pcibus
>>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?
>>>> \
>>>>                                   cpu_all_mask :
>>>> \
>>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>>   #endif
>>>>
>>>> -#endif /* CONFIG_NUMA */
>>>> -
>>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>>
>>>>   #ifndef set_numa_mem
>>>>
>>>> i have got below compilation error withour macro defined in arch code.
>>>>
>>>> drivers/pci/pci-sysfs.c: In function ‘cpuaffinity_show’:
>>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>>> function ‘cpumask_of_pcibus’ [-Werror=implicit-function-declaration]
>>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> drivers/pci/pci-sysfs.c: In function ‘cpulistaffinity_show’:
>>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> cc1: some warnings being treated as errors
>>>>
>>>>
>>>> i can send this as separate patch( as a  fix patch).
>>>
>>>
>>> Unless your series has already been merged, I don't like the idea of a
>>> separate fix patch.  The whole point of reviews is to try to fix as
>>> many things as we can *before* merging.
>>
>> thanks for the review.
>> sure, i will add  this as part of my numa patch series.
>>>
>>>
>>> Bjorn
>>
>>
>> thanks
>> Ganapat
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-11 17:26               ` Ganapatrao Kulkarni
  0 siblings, 0 replies; 24+ messages in thread
From: Ganapatrao Kulkarni @ 2016-01-11 17:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Bjorn, Will,

On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
>
>
> On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
>>
>> Hi Bjorn,
>>
>> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
>>>
>>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
>>>>
>>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
>>>> wrote:
>>>>>
>>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
>>>>>>
>>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
>>>>>>>
>>>>>>> Adding helper functions and necessary code to make
>>>>>>> pci driver(pci-host-generic) numa aware.
>>>>>>>
>>>>>>> This patch is on top of arm64-numa v7.
>>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
>>>>>>>
>>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
>>>>>>> ---
>>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
>>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
>>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
>
>
> set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> Was this forgotten?
i am not sure on adding numa required change(it is one line add) to
pci-host-generic.c in numa patchset itself.
Is it more appropriate to send as separate patch?
please suggest.


Thanks Matthias for your comment.
>
> Regards,
> Matthias
>
>>>>>>>   3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> diff --git a/arch/arm64/include/asm/numa.h
>>>>>>> b/arch/arm64/include/asm/numa.h
>>>>>>> index b8c2a3f..1eca4db 100644
>>>>>>> --- a/arch/arm64/include/asm/numa.h
>>>>>>> +++ b/arch/arm64/include/asm/numa.h
>>>>>>> @@ -15,9 +15,11 @@
>>>>>>>   extern int __node_distance(int from, int to);
>>>>>>>   #define node_distance(a, b) __node_distance(a, b)
>>>>>>>
>>>>>>> -/* dummy definitions for pci functions */
>>>>>>> -#define pcibus_to_node(node)       0
>>>>>>> -#define cpumask_of_pcibus(bus)     0
>>>>>>> +struct pci_bus;
>>>>>>> +extern int pcibus_to_node(struct pci_bus *bus);
>>>>>>> +#define cpumask_of_pcibus(bus)     (pcibus_to_node(bus) == -1 ?
>>>>>>> \
>>>>>>> +                            cpu_all_mask :                         \
>>>>>>> +                            cpumask_of_node(pcibus_to_node(bus)))
>>>>>>
>>>>>>
>>>>>> All the arch definitions of cpumask_of_pcibus() are pretty similar;
>>>>>> could they be made more generic?  At the very least, can you drop the
>>>>>> definition here and use the one in include/asm-generic/topology.h,
>>>>>> which is identical to what you're defining here?
>>>>
>>>> macro cpumask_of_pcibus is defined under #ifndef CONFIG_NUMA in
>>>> include/asm-generic/topology.h
>>>> and this macro is defined again for NUMA in respective arch header
>>>> files.
>>>> i think moving this macro from ifndef will allow us to use without
>>>> redefinition.
>>>>
>>>> --- a/include/asm-generic/topology.h
>>>> +++ b/include/asm-generic/topology.h
>>>> @@ -54,14 +54,14 @@
>>>>   #define pcibus_to_node(bus)    ((void)(bus), -1)
>>>>   #endif
>>>>
>>>> +#endif /* CONFIG_NUMA */
>>>> +
>>>>   #ifndef cpumask_of_pcibus
>>>>   #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ?
>>>> \
>>>>                                   cpu_all_mask :
>>>> \
>>>>                                   cpumask_of_node(pcibus_to_node(bus)))
>>>>   #endif
>>>>
>>>> -#endif /* CONFIG_NUMA */
>>>> -
>>>>   #if !defined(CONFIG_NUMA) || !defined(CONFIG_HAVE_MEMORYLESS_NODES)
>>>>
>>>>   #ifndef set_numa_mem
>>>>
>>>> i have got below compilation error withour macro defined in arch code.
>>>>
>>>> drivers/pci/pci-sysfs.c: In function ?cpuaffinity_show?:
>>>> drivers/pci/pci-sysfs.c:114:15: error: implicit declaration of
>>>> function ?cpumask_of_pcibus? [-Werror=implicit-function-declaration]
>>>> drivers/pci/pci-sysfs.c:114:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> drivers/pci/pci-sysfs.c: In function ?cpulistaffinity_show?:
>>>> drivers/pci/pci-sysfs.c:123:34: warning: initialization makes pointer
>>>> from integer without a cast [enabled by default]
>>>> cc1: some warnings being treated as errors
>>>>
>>>>
>>>> i can send this as separate patch( as a  fix patch).
>>>
>>>
>>> Unless your series has already been merged, I don't like the idea of a
>>> separate fix patch.  The whole point of reviews is to try to fix as
>>> many things as we can *before* merging.
>>
>> thanks for the review.
>> sure, i will add  this as part of my numa patch series.
>>>
>>>
>>> Bjorn
>>
>>
>> thanks
>> Ganapat
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
  2016-01-11 17:26               ` Ganapatrao Kulkarni
  (?)
@ 2016-01-15 23:38                 ` Bjorn Helgaas
  -1 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-15 23:38 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Matthias Brugger, Prasun Kapoor, linux-pci, Will Deacon,
	linux-kernel, Robert Richter, Hanjun Guo, Catalin Marinas,
	Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel

On Mon, Jan 11, 2016 at 10:56:59PM +0530, Ganapatrao Kulkarni wrote:
> Hi Bjorn, Will,
> 
> On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
> >
> >
> > On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> >>
> >> Hi Bjorn,
> >>
> >> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >>>
> >>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> >>>>
> >>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
> >>>> wrote:
> >>>>>
> >>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >>>>>>
> >>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >>>>>>>
> >>>>>>> Adding helper functions and necessary code to make
> >>>>>>> pci driver(pci-host-generic) numa aware.
> >>>>>>>
> >>>>>>> This patch is on top of arm64-numa v7.
> >>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
> >>>>>>>
> >>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >>>>>>> ---
> >>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
> >>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
> >>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
> >
> >
> > set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> > Was this forgotten?
> i am not sure on adding numa required change(it is one line add) to
> pci-host-generic.c in numa patchset itself.
> Is it more appropriate to send as separate patch?
> please suggest.

I haven't seen the whole series, so I can't really give a suggestion.
If you want me to see it, please sent to linux-pci@vger.kernel.org or
helgaas@kernel.org.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-15 23:38                 ` Bjorn Helgaas
  0 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-15 23:38 UTC (permalink / raw)
  To: Ganapatrao Kulkarni
  Cc: Matthias Brugger, Prasun Kapoor, linux-pci, Will Deacon,
	linux-kernel, Robert Richter, Hanjun Guo, Catalin Marinas,
	Bjorn Helgaas, Ganapatrao Kulkarni, linux-arm-kernel

On Mon, Jan 11, 2016 at 10:56:59PM +0530, Ganapatrao Kulkarni wrote:
> Hi Bjorn, Will,
> 
> On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
> >
> >
> > On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> >>
> >> Hi Bjorn,
> >>
> >> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >>>
> >>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> >>>>
> >>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
> >>>> wrote:
> >>>>>
> >>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >>>>>>
> >>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >>>>>>>
> >>>>>>> Adding helper functions and necessary code to make
> >>>>>>> pci driver(pci-host-generic) numa aware.
> >>>>>>>
> >>>>>>> This patch is on top of arm64-numa v7.
> >>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
> >>>>>>>
> >>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >>>>>>> ---
> >>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
> >>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
> >>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
> >
> >
> > set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> > Was this forgotten?
> i am not sure on adding numa required change(it is one line add) to
> pci-host-generic.c in numa patchset itself.
> Is it more appropriate to send as separate patch?
> please suggest.

I haven't seen the whole series, so I can't really give a suggestion.
If you want me to see it, please sent to linux-pci@vger.kernel.org or
helgaas@kernel.org.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] arm64, pci, numa: Adding helper functions as required by pci
@ 2016-01-15 23:38                 ` Bjorn Helgaas
  0 siblings, 0 replies; 24+ messages in thread
From: Bjorn Helgaas @ 2016-01-15 23:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 11, 2016 at 10:56:59PM +0530, Ganapatrao Kulkarni wrote:
> Hi Bjorn, Will,
> 
> On Mon, Jan 11, 2016 at 10:42 PM, Matthias Brugger <mbrugger@suse.com> wrote:
> >
> >
> > On 09/01/16 16:35, Ganapatrao Kulkarni wrote:
> >>
> >> Hi Bjorn,
> >>
> >> On Sat, Jan 9, 2016 at 8:54 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >>>
> >>> On Sat, Jan 09, 2016 at 11:35:17AM +0530, Ganapatrao Kulkarni wrote:
> >>>>
> >>>> On Fri, Jan 8, 2016 at 11:36 PM, Will Deacon <will.deacon@arm.com>
> >>>> wrote:
> >>>>>
> >>>>> On Fri, Jan 08, 2016 at 12:01:31PM -0600, Bjorn Helgaas wrote:
> >>>>>>
> >>>>>> On Tue, Dec 22, 2015 at 04:08:50PM +0530, Ganapatrao Kulkarni wrote:
> >>>>>>>
> >>>>>>> Adding helper functions and necessary code to make
> >>>>>>> pci driver(pci-host-generic) numa aware.
> >>>>>>>
> >>>>>>> This patch is on top of arm64-numa v7.
> >>>>>>> http://www.spinics.net/lists/arm-kernel/msg460813.html
> >>>>>>>
> >>>>>>> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
> >>>>>>> ---
> >>>>>>>   arch/arm64/include/asm/numa.h       | 8 +++++---
> >>>>>>>   arch/arm64/kernel/pci.c             | 8 ++++++++
> >>>>>>>   drivers/pci/host/pci-host-generic.c | 1 +
> >
> >
> > set_dev_node() in pci-host-generic.c is missing in v8 of your numa patches.
> > Was this forgotten?
> i am not sure on adding numa required change(it is one line add) to
> pci-host-generic.c in numa patchset itself.
> Is it more appropriate to send as separate patch?
> please suggest.

I haven't seen the whole series, so I can't really give a suggestion.
If you want me to see it, please sent to linux-pci at vger.kernel.org or
helgaas at kernel.org.

Bjorn

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2016-01-15 23:38 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 10:38 [PATCH] arm64, pci, numa: Adding helper functions as required by pci Ganapatrao Kulkarni
2015-12-22 10:38 ` Ganapatrao Kulkarni
2016-01-08 18:01 ` Bjorn Helgaas
2016-01-08 18:01   ` Bjorn Helgaas
2016-01-08 18:06   ` Will Deacon
2016-01-08 18:06     ` Will Deacon
2016-01-09  6:05     ` Ganapatrao Kulkarni
2016-01-09  6:05       ` Ganapatrao Kulkarni
2016-01-09  6:05       ` Ganapatrao Kulkarni
2016-01-09 15:24       ` Bjorn Helgaas
2016-01-09 15:24         ` Bjorn Helgaas
2016-01-09 15:24         ` Bjorn Helgaas
2016-01-09 15:35         ` Ganapatrao Kulkarni
2016-01-09 15:35           ` Ganapatrao Kulkarni
2016-01-09 15:35           ` Ganapatrao Kulkarni
2016-01-11 17:12           ` Matthias Brugger
2016-01-11 17:12             ` Matthias Brugger
2016-01-11 17:12             ` Matthias Brugger
2016-01-11 17:26             ` Ganapatrao Kulkarni
2016-01-11 17:26               ` Ganapatrao Kulkarni
2016-01-11 17:26               ` Ganapatrao Kulkarni
2016-01-15 23:38               ` Bjorn Helgaas
2016-01-15 23:38                 ` Bjorn Helgaas
2016-01-15 23:38                 ` Bjorn Helgaas

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.