linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config
@ 2014-06-05 15:21 Shreyas B. Prabhu
  2014-06-05 15:24 ` [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs Shreyas B. Prabhu
  2014-06-06  5:33 ` [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Anshuman Khandual
  0 siblings, 2 replies; 6+ messages in thread
From: Shreyas B. Prabhu @ 2014-06-05 15:21 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras
  Cc: Geert Uytterhoeven, linuxppc-dev, linux-kernel, Shreyas B. Prabhu

Build throws following errors when CONFIG_SMP=n
arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
    rc = opal_query_cpu_status(get_hard_smp_processor_id(i),

The usage of get_hard_smp_processor_id() needs the declaration from
<asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
only on SMP configs and hence UP builds fail.

Fix this by directly including <asm/smp.h> in setup.c unconditionally.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 8c16a5f..678573c 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -35,6 +35,7 @@
 #include <asm/rtas.h>
 #include <asm/opal.h>
 #include <asm/kexec.h>
+#include <asm/smp.h>
 
 #include "powernv.h"
 
-- 
1.9.0

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

* [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs
  2014-06-05 15:21 [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Shreyas B. Prabhu
@ 2014-06-05 15:24 ` Shreyas B. Prabhu
  2014-06-06  5:52   ` Anshuman Khandual
  2014-06-06  5:33 ` [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Anshuman Khandual
  1 sibling, 1 reply; 6+ messages in thread
From: Shreyas B. Prabhu @ 2014-06-05 15:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
  Cc: Shreyas B. Prabhu, linuxppc-dev, linux-kernel

Build throws following errors when CONFIG_SMP=n
arch/powerpc/platforms/powernv/subcore.c: In function ‘cpu_update_split_mode’:
arch/powerpc/platforms/powernv/subcore.c:274:15: error: ‘setup_max_cpus’ undeclared (first use in this function)
arch/powerpc/platforms/powernv/subcore.c:285:5: error: lvalue required as left operand of assignment

'setup_max_cpus' variable is relevant only on SMP, so there is no point
working around it for UP. Furthermore, subcore.c itself is relevant only
on SMP and hence the better solution is to exclude subcore.c for UP builds.

Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
---
This patch applies on top of ben/powerpc.git/next branch

 arch/powerpc/platforms/powernv/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc/platforms/powernv/Makefile
index 4ad0d34..636d206 100644
--- a/arch/powerpc/platforms/powernv/Makefile
+++ b/arch/powerpc/platforms/powernv/Makefile
@@ -1,9 +1,9 @@
 obj-y			+= setup.o opal-takeover.o opal-wrappers.o opal.o opal-async.o
 obj-y			+= opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
 obj-y			+= rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
-obj-y			+= opal-msglog.o subcore.o subcore-asm.o
+obj-y			+= opal-msglog.o subcore-asm.o
 
-obj-$(CONFIG_SMP)	+= smp.o
+obj-$(CONFIG_SMP)	+= smp.o subcore.o
 obj-$(CONFIG_PCI)	+= pci.o pci-p5ioc2.o pci-ioda.o
 obj-$(CONFIG_EEH)	+= eeh-ioda.o eeh-powernv.o
 obj-$(CONFIG_PPC_SCOM)	+= opal-xscom.o
-- 
1.9.0

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

* Re: [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config
  2014-06-05 15:21 [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Shreyas B. Prabhu
  2014-06-05 15:24 ` [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs Shreyas B. Prabhu
@ 2014-06-06  5:33 ` Anshuman Khandual
  2014-06-06  6:30   ` Geert Uytterhoeven
  2014-06-06 11:03   ` Benjamin Herrenschmidt
  1 sibling, 2 replies; 6+ messages in thread
From: Anshuman Khandual @ 2014-06-06  5:33 UTC (permalink / raw)
  To: Shreyas B. Prabhu
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel, Geert Uytterhoeven

On 06/05/2014 08:51 PM, Shreyas B. Prabhu wrote:
> Build throws following errors when CONFIG_SMP=n
> arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
> arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
>     rc = opal_query_cpu_status(get_hard_smp_processor_id(i),
> 
> The usage of get_hard_smp_processor_id() needs the declaration from
> <asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
> includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
> only on SMP configs and hence UP builds fail.
> 
> Fix this by directly including <asm/smp.h> in setup.c unconditionally.

Can you please clean up the description in the commit message ? and also
the first line in the commit message should mention that the patch is
trying to fix a UP specific build failure.

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

* Re: [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs
  2014-06-05 15:24 ` [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs Shreyas B. Prabhu
@ 2014-06-06  5:52   ` Anshuman Khandual
  0 siblings, 0 replies; 6+ messages in thread
From: Anshuman Khandual @ 2014-06-06  5:52 UTC (permalink / raw)
  To: Shreyas B. Prabhu; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel

On 06/05/2014 08:54 PM, Shreyas B. Prabhu wrote:
> Build throws following errors when CONFIG_SMP=n
> arch/powerpc/platforms/powernv/subcore.c: In function ‘cpu_update_split_mode’:
> arch/powerpc/platforms/powernv/subcore.c:274:15: error: ‘setup_max_cpus’ undeclared (first use in this function)
> arch/powerpc/platforms/powernv/subcore.c:285:5: error: lvalue required as left operand of assignment
> 
> 'setup_max_cpus' variable is relevant only on SMP, so there is no point
> working around it for UP. Furthermore, subcore.c itself is relevant only
> on SMP and hence the better solution is to exclude subcore.c for UP builds.
> 
> Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
> ---
> This patch applies on top of ben/powerpc.git/next branch
> 
>  arch/powerpc/platforms/powernv/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc/platforms/powernv/Makefile
> index 4ad0d34..636d206 100644
> --- a/arch/powerpc/platforms/powernv/Makefile
> +++ b/arch/powerpc/platforms/powernv/Makefile
> @@ -1,9 +1,9 @@
>  obj-y			+= setup.o opal-takeover.o opal-wrappers.o opal.o opal-async.o
>  obj-y			+= opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
>  obj-y			+= rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
> -obj-y			+= opal-msglog.o subcore.o subcore-asm.o
> +obj-y			+= opal-msglog.o subcore-asm.o
> 

subcore-asm.o can also move down here as well ?

> -obj-$(CONFIG_SMP)	+= smp.o
> +obj-$(CONFIG_SMP)	+= smp.o subcore.o

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

* Re: [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config
  2014-06-06  5:33 ` [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Anshuman Khandual
@ 2014-06-06  6:30   ` Geert Uytterhoeven
  2014-06-06 11:03   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-06-06  6:30 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Shreyas B. Prabhu, Paul Mackerras, linuxppc-dev, linux-kernel

On Fri, Jun 6, 2014 at 7:33 AM, Anshuman Khandual
<khandual@linux.vnet.ibm.com> wrote:
> On 06/05/2014 08:51 PM, Shreyas B. Prabhu wrote:
>> Build throws following errors when CONFIG_SMP=3Dn
>> arch/powerpc/platforms/powernv/setup.c: In function =E2=80=98pnv_kexec_w=
ait_secondaries_down=E2=80=99:
>> arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaratio=
n of function =E2=80=98get_hard_smp_processor_id=E2=80=99
>>     rc =3D opal_query_cpu_status(get_hard_smp_processor_id(i),
>>
>> The usage of get_hard_smp_processor_id() needs the declaration from
>> <asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
>> includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
>> only on SMP configs and hence UP builds fail.
>>
>> Fix this by directly including <asm/smp.h> in setup.c unconditionally.
>
> Can you please clean up the description in the commit message ? and also
> the first line in the commit message should mention that the patch is
> trying to fix a UP specific build failure.

Both the one-line summary and the first line already mention "UP" or
"CONFIG_SMP=3Dn".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k=
.org

In personal conversations with technical people, I call myself a hacker. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
                                -- Linus Torvalds

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

* Re: [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config
  2014-06-06  5:33 ` [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Anshuman Khandual
  2014-06-06  6:30   ` Geert Uytterhoeven
@ 2014-06-06 11:03   ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2014-06-06 11:03 UTC (permalink / raw)
  To: Anshuman Khandual
  Cc: Shreyas B. Prabhu, Paul Mackerras, linuxppc-dev, linux-kernel,
	Geert Uytterhoeven

On Fri, 2014-06-06 at 11:03 +0530, Anshuman Khandual wrote:
> On 06/05/2014 08:51 PM, Shreyas B. Prabhu wrote:
> > Build throws following errors when CONFIG_SMP=n
> > arch/powerpc/platforms/powernv/setup.c: In function ‘pnv_kexec_wait_secondaries_down’:
> > arch/powerpc/platforms/powernv/setup.c:179:4: error: implicit declaration of function ‘get_hard_smp_processor_id’
> >     rc = opal_query_cpu_status(get_hard_smp_processor_id(i),
> > 
> > The usage of get_hard_smp_processor_id() needs the declaration from
> > <asm/smp.h>. The file setup.c includes <linux/sched.h>, which in-turn
> > includes <linux/smp.h>. However, <linux/smp.h> includes <asm/smp.h>
> > only on SMP configs and hence UP builds fail.
> > 
> > Fix this by directly including <asm/smp.h> in setup.c unconditionally.
> 
> Can you please clean up the description in the commit message ? and also
> the first line in the commit message should mention that the patch is
> trying to fix a UP specific build failure.

I don't understand your comment ... the description and subject line
are perfectly fine...

Ben.

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

end of thread, other threads:[~2014-06-06 11:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 15:21 [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Shreyas B. Prabhu
2014-06-05 15:24 ` [PATCH 2/2] powerpc/powernv : Disable subcore for UP configs Shreyas B. Prabhu
2014-06-06  5:52   ` Anshuman Khandual
2014-06-06  5:33 ` [PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config Anshuman Khandual
2014-06-06  6:30   ` Geert Uytterhoeven
2014-06-06 11:03   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).