All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-04 20:53 ` Mathieu Malaterre
  0 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-04 20:53 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Christophe Leroy, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev, linux-kernel

The code:

  ifdef CONFIG_6xx
  KBUILD_CFLAGS          += -mcpu=powerpc
  endif

was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
explicitly in kernel compiles"). This change was acceptable since the
TARGET_CPU logic was 64-bit only.

Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
also on PPC32") this logic is no longer acceptable after the TARGET_CPU
specific. It currently appends -mcpu=powerpc at the end of the command
line, after any TARGET_CPU specific:

  gcc -Wp,-MD,init/.do_mounts.o.d ...
    -mcpu=powerpc -mbig-endian -m32 ...
    -mcpu=e300c2 ...
    -mcpu=powerpc ...
    ../init/do_mounts.c

Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2ce14d68d0..544b30667ea5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -30,6 +30,10 @@ endif
 endif
 endif
 
+ifdef CONFIG_6xx
+KBUILD_CFLAGS		+= -mcpu=powerpc
+endif
+
 ifeq ($(CROSS_COMPILE),)
 KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
 else
@@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
 
-ifdef CONFIG_6xx
-KBUILD_CFLAGS		+= -mcpu=powerpc
-endif
-
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
-- 
2.19.2


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

* [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-04 20:53 ` Mathieu Malaterre
  0 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-04 20:53 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, linux-kernel, Paul Mackerras, linuxppc-dev

The code:

  ifdef CONFIG_6xx
  KBUILD_CFLAGS          += -mcpu=powerpc
  endif

was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
explicitly in kernel compiles"). This change was acceptable since the
TARGET_CPU logic was 64-bit only.

Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
also on PPC32") this logic is no longer acceptable after the TARGET_CPU
specific. It currently appends -mcpu=powerpc at the end of the command
line, after any TARGET_CPU specific:

  gcc -Wp,-MD,init/.do_mounts.o.d ...
    -mcpu=powerpc -mbig-endian -m32 ...
    -mcpu=e300c2 ...
    -mcpu=powerpc ...
    ../init/do_mounts.c

Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2ce14d68d0..544b30667ea5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -30,6 +30,10 @@ endif
 endif
 endif
 
+ifdef CONFIG_6xx
+KBUILD_CFLAGS		+= -mcpu=powerpc
+endif
+
 ifeq ($(CROSS_COMPILE),)
 KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
 else
@@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
 
-ifdef CONFIG_6xx
-KBUILD_CFLAGS		+= -mcpu=powerpc
-endif
-
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
-- 
2.19.2


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

* Re: [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
  2018-12-04 20:53 ` Mathieu Malaterre
@ 2018-12-04 21:28   ` Christophe LEROY
  -1 siblings, 0 replies; 10+ messages in thread
From: Christophe LEROY @ 2018-12-04 21:28 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, linux-kernel



Le 04/12/2018 à 21:53, Mathieu Malaterre a écrit :
> The code:
> 
>    ifdef CONFIG_6xx
>    KBUILD_CFLAGS          += -mcpu=powerpc
>    endif
> 
> was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> explicitly in kernel compiles"). This change was acceptable since the
> TARGET_CPU logic was 64-bit only.
> 
> Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> specific. It currently appends -mcpu=powerpc at the end of the command
> line, after any TARGET_CPU specific:
> 
>    gcc -Wp,-MD,init/.do_mounts.o.d ...
>      -mcpu=powerpc -mbig-endian -m32 ...
>      -mcpu=e300c2 ...
>      -mcpu=powerpc ...
>      ../init/do_mounts.c
> 
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   arch/powerpc/Makefile | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 8a2ce14d68d0..544b30667ea5 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -30,6 +30,10 @@ endif
>   endif
>   endif
>   
> +ifdef CONFIG_6xx
> +KBUILD_CFLAGS		+= -mcpu=powerpc
> +endif
> +

Could you make the patch on top of my serie (ie after the change of 
CONFIG_6xx to CONFIG_BOOK3S_32 ?

The serie is in origin/next-test

Thanks,
Christophe

>   ifeq ($(CROSS_COMPILE),)
>   KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
>   else
> @@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
>   # often slow when they are implemented at all
>   KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
>   
> -ifdef CONFIG_6xx
> -KBUILD_CFLAGS		+= -mcpu=powerpc
> -endif
> -
>   cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
>   cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
>   cpu-as-$(CONFIG_E200)		+= -Wa,-me200
> 

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

* Re: [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-04 21:28   ` Christophe LEROY
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe LEROY @ 2018-12-04 21:28 UTC (permalink / raw)
  To: Mathieu Malaterre, Michael Ellerman
  Cc: Paul Mackerras, linuxppc-dev, linux-kernel



Le 04/12/2018 à 21:53, Mathieu Malaterre a écrit :
> The code:
> 
>    ifdef CONFIG_6xx
>    KBUILD_CFLAGS          += -mcpu=powerpc
>    endif
> 
> was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> explicitly in kernel compiles"). This change was acceptable since the
> TARGET_CPU logic was 64-bit only.
> 
> Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> specific. It currently appends -mcpu=powerpc at the end of the command
> line, after any TARGET_CPU specific:
> 
>    gcc -Wp,-MD,init/.do_mounts.o.d ...
>      -mcpu=powerpc -mbig-endian -m32 ...
>      -mcpu=e300c2 ...
>      -mcpu=powerpc ...
>      ../init/do_mounts.c
> 
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>   arch/powerpc/Makefile | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 8a2ce14d68d0..544b30667ea5 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -30,6 +30,10 @@ endif
>   endif
>   endif
>   
> +ifdef CONFIG_6xx
> +KBUILD_CFLAGS		+= -mcpu=powerpc
> +endif
> +

Could you make the patch on top of my serie (ie after the change of 
CONFIG_6xx to CONFIG_BOOK3S_32 ?

The serie is in origin/next-test

Thanks,
Christophe

>   ifeq ($(CROSS_COMPILE),)
>   KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
>   else
> @@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
>   # often slow when they are implemented at all
>   KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
>   
> -ifdef CONFIG_6xx
> -KBUILD_CFLAGS		+= -mcpu=powerpc
> -endif
> -
>   cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
>   cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
>   cpu-as-$(CONFIG_E200)		+= -Wa,-me200
> 

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

* Re: [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
  2018-12-04 21:28   ` Christophe LEROY
@ 2018-12-05  7:40     ` Mathieu Malaterre
  -1 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-05  7:40 UTC (permalink / raw)
  To: Christophe LEROY
  Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, LKML

On Tue, Dec 4, 2018 at 10:28 PM Christophe LEROY
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 04/12/2018 à 21:53, Mathieu Malaterre a écrit :
> > The code:
> >
> >    ifdef CONFIG_6xx
> >    KBUILD_CFLAGS          += -mcpu=powerpc
> >    endif
> >
> > was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> > explicitly in kernel compiles"). This change was acceptable since the
> > TARGET_CPU logic was 64-bit only.
> >
> > Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> > also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> > specific. It currently appends -mcpu=powerpc at the end of the command
> > line, after any TARGET_CPU specific:
> >
> >    gcc -Wp,-MD,init/.do_mounts.o.d ...
> >      -mcpu=powerpc -mbig-endian -m32 ...
> >      -mcpu=e300c2 ...
> >      -mcpu=powerpc ...
> >      ../init/do_mounts.c
> >
> > Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> > Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> > Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> > Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
> > ---
> >   arch/powerpc/Makefile | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index 8a2ce14d68d0..544b30667ea5 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -30,6 +30,10 @@ endif
> >   endif
> >   endif
> >
> > +ifdef CONFIG_6xx
> > +KBUILD_CFLAGS                += -mcpu=powerpc
> > +endif
> > +
>
> Could you make the patch on top of my serie (ie after the change of
> CONFIG_6xx to CONFIG_BOOK3S_32 ?

Sure. That will defeat the point of the Fixes: line, but I guess who
cares anyway ? Will re-submit asap.

> The serie is in origin/next-test
>
> Thanks,
> Christophe
>
> >   ifeq ($(CROSS_COMPILE),)
> >   KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
> >   else
> > @@ -241,10 +245,6 @@ KBUILD_CFLAGS    += $(call cc-option,-fno-dwarf2-cfi-asm)
> >   # often slow when they are implemented at all
> >   KBUILD_CFLAGS               += $(call cc-option,-mno-string)
> >
> > -ifdef CONFIG_6xx
> > -KBUILD_CFLAGS                += -mcpu=powerpc
> > -endif
> > -
> >   cpu-as-$(CONFIG_4xx)                += -Wa,-m405
> >   cpu-as-$(CONFIG_ALTIVEC)    += $(call as-option,-Wa$(comma)-maltivec)
> >   cpu-as-$(CONFIG_E200)               += -Wa,-me200
> >

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

* Re: [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-05  7:40     ` Mathieu Malaterre
  0 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-05  7:40 UTC (permalink / raw)
  To: Christophe LEROY; +Cc: Paul Mackerras, linuxppc-dev, LKML

On Tue, Dec 4, 2018 at 10:28 PM Christophe LEROY
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 04/12/2018 à 21:53, Mathieu Malaterre a écrit :
> > The code:
> >
> >    ifdef CONFIG_6xx
> >    KBUILD_CFLAGS          += -mcpu=powerpc
> >    endif
> >
> > was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> > explicitly in kernel compiles"). This change was acceptable since the
> > TARGET_CPU logic was 64-bit only.
> >
> > Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> > also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> > specific. It currently appends -mcpu=powerpc at the end of the command
> > line, after any TARGET_CPU specific:
> >
> >    gcc -Wp,-MD,init/.do_mounts.o.d ...
> >      -mcpu=powerpc -mbig-endian -m32 ...
> >      -mcpu=e300c2 ...
> >      -mcpu=powerpc ...
> >      ../init/do_mounts.c
> >
> > Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> > Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> > Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> > Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
> > ---
> >   arch/powerpc/Makefile | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index 8a2ce14d68d0..544b30667ea5 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -30,6 +30,10 @@ endif
> >   endif
> >   endif
> >
> > +ifdef CONFIG_6xx
> > +KBUILD_CFLAGS                += -mcpu=powerpc
> > +endif
> > +
>
> Could you make the patch on top of my serie (ie after the change of
> CONFIG_6xx to CONFIG_BOOK3S_32 ?

Sure. That will defeat the point of the Fixes: line, but I guess who
cares anyway ? Will re-submit asap.

> The serie is in origin/next-test
>
> Thanks,
> Christophe
>
> >   ifeq ($(CROSS_COMPILE),)
> >   KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
> >   else
> > @@ -241,10 +245,6 @@ KBUILD_CFLAGS    += $(call cc-option,-fno-dwarf2-cfi-asm)
> >   # often slow when they are implemented at all
> >   KBUILD_CFLAGS               += $(call cc-option,-mno-string)
> >
> > -ifdef CONFIG_6xx
> > -KBUILD_CFLAGS                += -mcpu=powerpc
> > -endif
> > -
> >   cpu-as-$(CONFIG_4xx)                += -Wa,-m405
> >   cpu-as-$(CONFIG_ALTIVEC)    += $(call as-option,-Wa$(comma)-maltivec)
> >   cpu-as-$(CONFIG_E200)               += -Wa,-me200
> >

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

* [PATCH v2] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
  2018-12-04 20:53 ` Mathieu Malaterre
@ 2018-12-05 17:53   ` Mathieu Malaterre
  -1 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-05 17:53 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, Christophe Leroy, Benjamin Herrenschmidt,
	Paul Mackerras, linuxppc-dev, linux-kernel

The code:

  ifdef CONFIG_6xx
  KBUILD_CFLAGS          += -mcpu=powerpc
  endif

was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
explicitly in kernel compiles"). This change was acceptable since the
TARGET_CPU logic was 64-bit only.

Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
also on PPC32") this logic is no longer acceptable after the TARGET_CPU
specific. It currently appends -mcpu=powerpc at the end of the command
line, after any TARGET_CPU specific:

  gcc -Wp,-MD,init/.do_mounts.o.d ...
    -mcpu=powerpc -mbig-endian -m32 ...
    -mcpu=e300c2 ...
    -mcpu=powerpc ...
    ../init/do_mounts.c

Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: As suggested by Christophe rebase onto next-test

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

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 40bbeeeb5b4a..4b16588c920f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -30,6 +30,10 @@ endif
 endif
 endif
 
+ifdef CONFIG_PPC_BOOK3S_32
+KBUILD_CFLAGS		+= -mcpu=powerpc
+endif
+
 ifeq ($(CROSS_COMPILE),)
 KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
 else
@@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
 
-ifdef CONFIG_PPC_BOOK3S_32
-KBUILD_CFLAGS		+= -mcpu=powerpc
-endif
-
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
-- 
2.19.2


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

* [PATCH v2] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-05 17:53   ` Mathieu Malaterre
  0 siblings, 0 replies; 10+ messages in thread
From: Mathieu Malaterre @ 2018-12-05 17:53 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Mathieu Malaterre, linux-kernel, Paul Mackerras, linuxppc-dev

The code:

  ifdef CONFIG_6xx
  KBUILD_CFLAGS          += -mcpu=powerpc
  endif

was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
explicitly in kernel compiles"). This change was acceptable since the
TARGET_CPU logic was 64-bit only.

Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
also on PPC32") this logic is no longer acceptable after the TARGET_CPU
specific. It currently appends -mcpu=powerpc at the end of the command
line, after any TARGET_CPU specific:

  gcc -Wp,-MD,init/.do_mounts.o.d ...
    -mcpu=powerpc -mbig-endian -m32 ...
    -mcpu=e300c2 ...
    -mcpu=powerpc ...
    ../init/do_mounts.c

Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
v2: As suggested by Christophe rebase onto next-test

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

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 40bbeeeb5b4a..4b16588c920f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -30,6 +30,10 @@ endif
 endif
 endif
 
+ifdef CONFIG_PPC_BOOK3S_32
+KBUILD_CFLAGS		+= -mcpu=powerpc
+endif
+
 ifeq ($(CROSS_COMPILE),)
 KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
 else
@@ -241,10 +245,6 @@ KBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
 # often slow when they are implemented at all
 KBUILD_CFLAGS		+= $(call cc-option,-mno-string)
 
-ifdef CONFIG_PPC_BOOK3S_32
-KBUILD_CFLAGS		+= -mcpu=powerpc
-endif
-
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
-- 
2.19.2


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

* Re: [v2] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
  2018-12-05 17:53   ` Mathieu Malaterre
@ 2018-12-22  9:54     ` Michael Ellerman
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2018-12-22  9:54 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Mathieu Malaterre, linux-kernel, Paul Mackerras, linuxppc-dev

On Wed, 2018-12-05 at 17:53:55 UTC, Mathieu Malaterre wrote:
> The code:
> 
>   ifdef CONFIG_6xx
>   KBUILD_CFLAGS          += -mcpu=powerpc
>   endif
> 
> was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> explicitly in kernel compiles"). This change was acceptable since the
> TARGET_CPU logic was 64-bit only.
> 
> Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> specific. It currently appends -mcpu=powerpc at the end of the command
> line, after any TARGET_CPU specific:
> 
>   gcc -Wp,-MD,init/.do_mounts.o.d ...
>     -mcpu=powerpc -mbig-endian -m32 ...
>     -mcpu=e300c2 ...
>     -mcpu=powerpc ...
>     ../init/do_mounts.c
> 
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/ebd1d3b74f8542a8f3bb80b453692d

cheers

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

* Re: [v2] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic
@ 2018-12-22  9:54     ` Michael Ellerman
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Ellerman @ 2018-12-22  9:54 UTC (permalink / raw)
  To: Mathieu Malaterre
  Cc: Mathieu Malaterre, linuxppc-dev, Paul Mackerras, linux-kernel

On Wed, 2018-12-05 at 17:53:55 UTC, Mathieu Malaterre wrote:
> The code:
> 
>   ifdef CONFIG_6xx
>   KBUILD_CFLAGS          += -mcpu=powerpc
>   endif
> 
> was added in 2006 in commit f48b8296b315 ("[PATCH] powerpc32: Set cpu
> explicitly in kernel compiles"). This change was acceptable since the
> TARGET_CPU logic was 64-bit only.
> 
> Since commit 0e00a8c9fd92 ("powerpc: Allow CPU selection
> also on PPC32") this logic is no longer acceptable after the TARGET_CPU
> specific. It currently appends -mcpu=powerpc at the end of the command
> line, after any TARGET_CPU specific:
> 
>   gcc -Wp,-MD,init/.do_mounts.o.d ...
>     -mcpu=powerpc -mbig-endian -m32 ...
>     -mcpu=e300c2 ...
>     -mcpu=powerpc ...
>     ../init/do_mounts.c
> 
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Fixes: 0e00a8c9fd92 ("powerpc: Allow CPU selection also on PPC32")
> Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg142315.html
> Signed-off-by: Mathieu Malaterre <malat@debian.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/ebd1d3b74f8542a8f3bb80b453692d

cheers

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

end of thread, other threads:[~2018-12-22 17:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 20:53 [PATCH] powerpc/32: Move the old 6xx -mcpu logic before the TARGET_CPU logic Mathieu Malaterre
2018-12-04 20:53 ` Mathieu Malaterre
2018-12-04 21:28 ` Christophe LEROY
2018-12-04 21:28   ` Christophe LEROY
2018-12-05  7:40   ` Mathieu Malaterre
2018-12-05  7:40     ` Mathieu Malaterre
2018-12-05 17:53 ` [PATCH v2] " Mathieu Malaterre
2018-12-05 17:53   ` Mathieu Malaterre
2018-12-22  9:54   ` [v2] " Michael Ellerman
2018-12-22  9:54     ` Michael Ellerman

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.