* [PATCH 0/2] Remove -fno-unit-at-a-time and -funit-at-a-time compiler flags entirely
@ 2018-11-12 2:35 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: Richard Weinberger, linuxppc-dev, Michael Ellerman,
Masahiro Yamada, H. Peter Anvin, Borislav Petkov,
Benjamin Herrenschmidt, linux-kernel, Paul Mackerras
1/2: remove dead code, which is logically obvious
because the minimum GCC version is now 4.6
2/2: we can say -funit-at-a-time is no longer useful
according to GCC 4.6 manual
I hope, this series can be applied through x86 tree.
Masahiro Yamada (2):
um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
x86, powerpc: remove -funit-at-a-time compiler option entirely
arch/powerpc/Makefile | 4 ----
arch/x86/Makefile | 4 ----
arch/x86/Makefile.um | 9 ---------
3 files changed, 17 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/2] Remove -fno-unit-at-a-time and -funit-at-a-time compiler flags entirely
@ 2018-11-12 2:35 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: linux-kernel, Masahiro Yamada, Borislav Petkov, H. Peter Anvin,
Paul Mackerras, Richard Weinberger, linuxppc-dev
1/2: remove dead code, which is logically obvious
because the minimum GCC version is now 4.6
2/2: we can say -funit-at-a-time is no longer useful
according to GCC 4.6 manual
I hope, this series can be applied through x86 tree.
Masahiro Yamada (2):
um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
x86, powerpc: remove -funit-at-a-time compiler option entirely
arch/powerpc/Makefile | 4 ----
arch/x86/Makefile | 4 ----
arch/x86/Makefile.um | 9 ---------
3 files changed, 17 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-11-12 2:35 ` Masahiro Yamada
@ 2018-11-12 2:35 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: Richard Weinberger, linuxppc-dev, Michael Ellerman,
Masahiro Yamada, H. Peter Anvin, Borislav Petkov, linux-kernel
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
bumped the minimum GCC version to 4.6 for all architectures.
'$(call cc-option,-fno-unit-at-a-time)' is now dead code since
'$(cc-version) -lt 0400' is always false.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/x86/Makefile.um | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 91085a0..577976b 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
-# a lot more stack due to the lack of sharing of stacklots. Also, gcc
-# 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
- echo $(call cc-option,-fno-unit-at-a-time); \
- else echo $(call cc-option,-funit-at-a-time); fi ;)
+# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
+KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
KBUILD_CFLAGS += $(cflags-y)
--
2.7.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
@ 2018-11-12 2:35 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: linux-kernel, Masahiro Yamada, Borislav Petkov, H. Peter Anvin,
Richard Weinberger, linuxppc-dev
Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
bumped the minimum GCC version to 4.6 for all architectures.
'$(call cc-option,-fno-unit-at-a-time)' is now dead code since
'$(cc-version) -lt 0400' is always false.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/x86/Makefile.um | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 91085a0..577976b 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
-# a lot more stack due to the lack of sharing of stacklots. Also, gcc
-# 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
- echo $(call cc-option,-fno-unit-at-a-time); \
- else echo $(call cc-option,-funit-at-a-time); fi ;)
+# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
+KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
KBUILD_CFLAGS += $(cflags-y)
--
2.7.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-11-12 2:35 ` Masahiro Yamada
@ 2018-11-12 2:35 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: Richard Weinberger, linuxppc-dev, Michael Ellerman,
Masahiro Yamada, H. Peter Anvin, Borislav Petkov,
Benjamin Herrenschmidt, linux-kernel, Paul Mackerras
GCC 4.6 manual says:
-funit-at-a-time
This option is left for compatibility reasons. -funit-at-a-time has
no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
and -fno-section-anchors.
Enabled by default.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/powerpc/Makefile | 4 ----
arch/x86/Makefile | 4 ----
arch/x86/Makefile.um | 5 -----
3 files changed, 13 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2ce14..854199c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
-# Enable unit-at-a-time mode when possible. It shrinks the
-# kernel considerably.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
# FIXME: the module load should be taught about the additional relocs
# generated by this.
# revert to pre-gcc-4.4 behaviour of .eh_frame
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 88398fd..3508049 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -130,10 +130,6 @@ else
KBUILD_CFLAGS += -mno-red-zone
KBUILD_CFLAGS += -mcmodel=kernel
-
- # -funit-at-a-time shrinks the kernel .text considerably
- # unfortunately it makes reading oopses harder.
- KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
ifdef CONFIG_X86_X32
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 577976b..1db7913 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
KBUILD_CFLAGS += $(cflags-y)
else
@@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
LINK-y += -m64
-# Do unit-at-a-time unconditionally on x86_64, following the host
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
--
2.7.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-11-12 2:35 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-11-12 2:35 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, x86
Cc: linux-kernel, Masahiro Yamada, Borislav Petkov, H. Peter Anvin,
Paul Mackerras, Richard Weinberger, linuxppc-dev
GCC 4.6 manual says:
-funit-at-a-time
This option is left for compatibility reasons. -funit-at-a-time has
no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
and -fno-section-anchors.
Enabled by default.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/powerpc/Makefile | 4 ----
arch/x86/Makefile | 4 ----
arch/x86/Makefile.um | 5 -----
3 files changed, 13 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2ce14..854199c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
-# Enable unit-at-a-time mode when possible. It shrinks the
-# kernel considerably.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
# FIXME: the module load should be taught about the additional relocs
# generated by this.
# revert to pre-gcc-4.4 behaviour of .eh_frame
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 88398fd..3508049 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -130,10 +130,6 @@ else
KBUILD_CFLAGS += -mno-red-zone
KBUILD_CFLAGS += -mcmodel=kernel
-
- # -funit-at-a-time shrinks the kernel .text considerably
- # unfortunately it makes reading oopses harder.
- KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
ifdef CONFIG_X86_X32
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 577976b..1db7913 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
KBUILD_CFLAGS += $(cflags-y)
else
@@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
LINK-y += -m64
-# Do unit-at-a-time unconditionally on x86_64, following the host
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
--
2.7.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-11-12 2:35 ` Masahiro Yamada
@ 2018-11-12 3:01 ` Ingo Molnar
-1 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2018-11-12 3:01 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Ingo Molnar, Thomas Gleixner, x86, Richard Weinberger,
linuxppc-dev, Michael Ellerman, H. Peter Anvin, Borislav Petkov,
Benjamin Herrenschmidt, linux-kernel, Paul Mackerras
* Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> GCC 4.6 manual says:
>
> -funit-at-a-time
> This option is left for compatibility reasons. -funit-at-a-time has
> no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> and -fno-section-anchors.
> Enabled by default.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/powerpc/Makefile | 4 ----
> arch/x86/Makefile | 4 ----
> arch/x86/Makefile.um | 5 -----
> 3 files changed, 13 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 88398fd..3508049 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -130,10 +130,6 @@ else
>
> KBUILD_CFLAGS += -mno-red-zone
> KBUILD_CFLAGS += -mcmodel=kernel
> -
> - # -funit-at-a-time shrinks the kernel .text considerably
> - # unfortunately it makes reading oopses harder.
> - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> endif
>
> ifdef CONFIG_X86_X32
> diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> index 577976b..1db7913 100644
> --- a/arch/x86/Makefile.um
> +++ b/arch/x86/Makefile.um
> @@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> # an unresolved reference.
> cflags-y += -ffreestanding
>
> -# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> -
> KBUILD_CFLAGS += $(cflags-y)
>
> else
> @@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
> LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
> LINK-y += -m64
>
> -# Do unit-at-a-time unconditionally on x86_64, following the host
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> endif
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-11-12 3:01 ` Ingo Molnar
0 siblings, 0 replies; 26+ messages in thread
From: Ingo Molnar @ 2018-11-12 3:01 UTC (permalink / raw)
To: Masahiro Yamada
Cc: x86, linux-kernel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
Paul Mackerras, Thomas Gleixner, Richard Weinberger,
linuxppc-dev
* Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> GCC 4.6 manual says:
>
> -funit-at-a-time
> This option is left for compatibility reasons. -funit-at-a-time has
> no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> and -fno-section-anchors.
> Enabled by default.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/powerpc/Makefile | 4 ----
> arch/x86/Makefile | 4 ----
> arch/x86/Makefile.um | 5 -----
> 3 files changed, 13 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 88398fd..3508049 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -130,10 +130,6 @@ else
>
> KBUILD_CFLAGS += -mno-red-zone
> KBUILD_CFLAGS += -mcmodel=kernel
> -
> - # -funit-at-a-time shrinks the kernel .text considerably
> - # unfortunately it makes reading oopses harder.
> - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> endif
>
> ifdef CONFIG_X86_X32
> diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> index 577976b..1db7913 100644
> --- a/arch/x86/Makefile.um
> +++ b/arch/x86/Makefile.um
> @@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> # an unresolved reference.
> cflags-y += -ffreestanding
>
> -# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> -
> KBUILD_CFLAGS += $(cflags-y)
>
> else
> @@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
> LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
> LINK-y += -m64
>
> -# Do unit-at-a-time unconditionally on x86_64, following the host
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> endif
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-11-12 2:35 ` Masahiro Yamada
@ 2018-11-12 11:22 ` Michael Ellerman
-1 siblings, 0 replies; 26+ messages in thread
From: Michael Ellerman @ 2018-11-12 11:22 UTC (permalink / raw)
To: Masahiro Yamada, Ingo Molnar, Thomas Gleixner, x86
Cc: Richard Weinberger, linuxppc-dev, Masahiro Yamada,
H. Peter Anvin, Borislav Petkov, Benjamin Herrenschmidt,
linux-kernel, Paul Mackerras
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> GCC 4.6 manual says:
>
> -funit-at-a-time
> This option is left for compatibility reasons. -funit-at-a-time has
> no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> and -fno-section-anchors.
> Enabled by default.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/powerpc/Makefile | 4 ----
> arch/x86/Makefile | 4 ----
> arch/x86/Makefile.um | 5 -----
> 3 files changed, 13 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 8a2ce14..854199c 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
> KBUILD_CFLAGS += $(call cc-option,-mno-spe)
> KBUILD_CFLAGS += $(call cc-option,-mspe=no)
>
> -# Enable unit-at-a-time mode when possible. It shrinks the
> -# kernel considerably.
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> -
Thanks for cleaning it up.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-11-12 11:22 ` Michael Ellerman
0 siblings, 0 replies; 26+ messages in thread
From: Michael Ellerman @ 2018-11-12 11:22 UTC (permalink / raw)
To: Masahiro Yamada, Ingo Molnar, Thomas Gleixner, x86
Cc: linux-kernel, Masahiro Yamada, Borislav Petkov, H. Peter Anvin,
Paul Mackerras, Richard Weinberger, linuxppc-dev
Masahiro Yamada <yamada.masahiro@socionext.com> writes:
> GCC 4.6 manual says:
>
> -funit-at-a-time
> This option is left for compatibility reasons. -funit-at-a-time has
> no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> and -fno-section-anchors.
> Enabled by default.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/powerpc/Makefile | 4 ----
> arch/x86/Makefile | 4 ----
> arch/x86/Makefile.um | 5 -----
> 3 files changed, 13 deletions(-)
>
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index 8a2ce14..854199c 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
> KBUILD_CFLAGS += $(call cc-option,-mno-spe)
> KBUILD_CFLAGS += $(call cc-option,-mspe=no)
>
> -# Enable unit-at-a-time mode when possible. It shrinks the
> -# kernel considerably.
> -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> -
Thanks for cleaning it up.
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-11-12 2:35 ` Masahiro Yamada
@ 2018-11-13 9:47 ` Richard Weinberger
-1 siblings, 0 replies; 26+ messages in thread
From: Richard Weinberger @ 2018-11-13 9:47 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Ingo Molnar, Thomas Gleixner, x86, linuxppc-dev,
Michael Ellerman, H. Peter Anvin, Borislav Petkov, linux-kernel
Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> bumped the minimum GCC version to 4.6 for all architectures.
>
> '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> '$(cc-version) -lt 0400' is always false.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/x86/Makefile.um | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> index 91085a0..577976b 100644
> --- a/arch/x86/Makefile.um
> +++ b/arch/x86/Makefile.um
> @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> # an unresolved reference.
> cflags-y += -ffreestanding
>
> -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> - echo $(call cc-option,-fno-unit-at-a-time); \
> - else echo $(call cc-option,-funit-at-a-time); fi ;)
> +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
@ 2018-11-13 9:47 ` Richard Weinberger
0 siblings, 0 replies; 26+ messages in thread
From: Richard Weinberger @ 2018-11-13 9:47 UTC (permalink / raw)
To: Masahiro Yamada
Cc: x86, linux-kernel, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
Thomas Gleixner, linuxppc-dev
Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> bumped the minimum GCC version to 4.6 for all architectures.
>
> '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> '$(cc-version) -lt 0400' is always false.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> arch/x86/Makefile.um | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> index 91085a0..577976b 100644
> --- a/arch/x86/Makefile.um
> +++ b/arch/x86/Makefile.um
> @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> # an unresolved reference.
> cflags-y += -ffreestanding
>
> -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> - echo $(call cc-option,-fno-unit-at-a-time); \
> - else echo $(call cc-option,-funit-at-a-time); fi ;)
> +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-11-13 9:47 ` Richard Weinberger
@ 2018-12-08 6:35 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:35 UTC (permalink / raw)
To: Ingo Molnar, X86 ML, Thomas Gleixner
Cc: linuxppc-dev, Michael Ellerman, H. Peter Anvin, Borislav Petkov,
Linux Kernel Mailing List, Richard Weinberger
x86 maintainers,
Ping.
On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
>
> Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > bumped the minimum GCC version to 4.6 for all architectures.
> >
> > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > '$(cc-version) -lt 0400' is always false.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > arch/x86/Makefile.um | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > index 91085a0..577976b 100644
> > --- a/arch/x86/Makefile.um
> > +++ b/arch/x86/Makefile.um
> > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > # an unresolved reference.
> > cflags-y += -ffreestanding
> >
> > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > - echo $(call cc-option,-fno-unit-at-a-time); \
> > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
>
> Acked-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
>
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
@ 2018-12-08 6:35 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:35 UTC (permalink / raw)
To: Ingo Molnar, X86 ML, Thomas Gleixner
Cc: H. Peter Anvin, Linux Kernel Mailing List, Borislav Petkov,
Richard Weinberger, linuxppc-dev
x86 maintainers,
Ping.
On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
>
> Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > bumped the minimum GCC version to 4.6 for all architectures.
> >
> > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > '$(cc-version) -lt 0400' is always false.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > arch/x86/Makefile.um | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > index 91085a0..577976b 100644
> > --- a/arch/x86/Makefile.um
> > +++ b/arch/x86/Makefile.um
> > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > # an unresolved reference.
> > cflags-y += -ffreestanding
> >
> > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > - echo $(call cc-option,-fno-unit-at-a-time); \
> > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
>
> Acked-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
>
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-11-12 11:22 ` Michael Ellerman
@ 2018-12-08 6:36 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:36 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, X86 ML
Cc: Richard Weinberger, linuxppc-dev, H. Peter Anvin,
Borislav Petkov, Benjamin Herrenschmidt,
Linux Kernel Mailing List, Paul Mackerras, Michael Ellerman
x86 maintainers,
Ping.
On Mon, Nov 12, 2018 at 8:23 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
> > GCC 4.6 manual says:
> >
> > -funit-at-a-time
> > This option is left for compatibility reasons. -funit-at-a-time has
> > no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> > and -fno-section-anchors.
> > Enabled by default.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > arch/powerpc/Makefile | 4 ----
> > arch/x86/Makefile | 4 ----
> > arch/x86/Makefile.um | 5 -----
> > 3 files changed, 13 deletions(-)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index 8a2ce14..854199c 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
> > KBUILD_CFLAGS += $(call cc-option,-mno-spe)
> > KBUILD_CFLAGS += $(call cc-option,-mspe=no)
> >
> > -# Enable unit-at-a-time mode when possible. It shrinks the
> > -# kernel considerably.
> > -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> > -
>
> Thanks for cleaning it up.
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> cheers
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-12-08 6:36 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 6:36 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, X86 ML
Cc: Linux Kernel Mailing List, Borislav Petkov, H. Peter Anvin,
Paul Mackerras, Richard Weinberger, linuxppc-dev
x86 maintainers,
Ping.
On Mon, Nov 12, 2018 at 8:23 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
> > GCC 4.6 manual says:
> >
> > -funit-at-a-time
> > This option is left for compatibility reasons. -funit-at-a-time has
> > no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
> > and -fno-section-anchors.
> > Enabled by default.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
> >
> > arch/powerpc/Makefile | 4 ----
> > arch/x86/Makefile | 4 ----
> > arch/x86/Makefile.um | 5 -----
> > 3 files changed, 13 deletions(-)
> >
> > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> > index 8a2ce14..854199c 100644
> > --- a/arch/powerpc/Makefile
> > +++ b/arch/powerpc/Makefile
> > @@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
> > KBUILD_CFLAGS += $(call cc-option,-mno-spe)
> > KBUILD_CFLAGS += $(call cc-option,-mspe=no)
> >
> > -# Enable unit-at-a-time mode when possible. It shrinks the
> > -# kernel considerably.
> > -KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> > -
>
> Thanks for cleaning it up.
>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au>
>
> cheers
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-12-08 6:35 ` Masahiro Yamada
@ 2018-12-08 8:54 ` Richard Weinberger
-1 siblings, 0 replies; 26+ messages in thread
From: Richard Weinberger @ 2018-12-08 8:54 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Ingo Molnar, X86 ML, Thomas Gleixner, linuxppc-dev,
Michael Ellerman, H. Peter Anvin, Borislav Petkov,
Linux Kernel Mailing List
Am Samstag, 8. Dezember 2018, 07:35:47 CET schrieb Masahiro Yamada:
> x86 maintainers,
>
>
> Ping.
I thought you carry this via your kbuild tree.
That said, I can merge it also via the um tree.
x86 is of course also fine. :-)
>
>
> On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
> >
> > Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > > bumped the minimum GCC version to 4.6 for all architectures.
> > >
> > > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > > '$(cc-version) -lt 0400' is always false.
> > >
> > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > ---
> > >
> > > arch/x86/Makefile.um | 8 ++------
> > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > > index 91085a0..577976b 100644
> > > --- a/arch/x86/Makefile.um
> > > +++ b/arch/x86/Makefile.um
> > > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > > # an unresolved reference.
> > > cflags-y += -ffreestanding
> > >
> > > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > > - echo $(call cc-option,-fno-unit-at-a-time); \
> > > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> >
> > Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
@ 2018-12-08 8:54 ` Richard Weinberger
0 siblings, 0 replies; 26+ messages in thread
From: Richard Weinberger @ 2018-12-08 8:54 UTC (permalink / raw)
To: Masahiro Yamada
Cc: X86 ML, Linux Kernel Mailing List, Ingo Molnar, Borislav Petkov,
H. Peter Anvin, Thomas Gleixner, linuxppc-dev
Am Samstag, 8. Dezember 2018, 07:35:47 CET schrieb Masahiro Yamada:
> x86 maintainers,
>
>
> Ping.
I thought you carry this via your kbuild tree.
That said, I can merge it also via the um tree.
x86 is of course also fine. :-)
>
>
> On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
> >
> > Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > > bumped the minimum GCC version to 4.6 for all architectures.
> > >
> > > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > > '$(cc-version) -lt 0400' is always false.
> > >
> > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > ---
> > >
> > > arch/x86/Makefile.um | 8 ++------
> > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > > index 91085a0..577976b 100644
> > > --- a/arch/x86/Makefile.um
> > > +++ b/arch/x86/Makefile.um
> > > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > > # an unresolved reference.
> > > cflags-y += -ffreestanding
> > >
> > > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > > - echo $(call cc-option,-fno-unit-at-a-time); \
> > > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> >
> > Acked-by: Richard Weinberger <richard@nod.at>
Thanks,
//richard
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-12-08 6:36 ` Masahiro Yamada
@ 2018-12-08 11:33 ` Borislav Petkov
-1 siblings, 0 replies; 26+ messages in thread
From: Borislav Petkov @ 2018-12-08 11:33 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Ingo Molnar, Thomas Gleixner, X86 ML, Richard Weinberger,
linuxppc-dev, H. Peter Anvin, Benjamin Herrenschmidt,
Linux Kernel Mailing List, Paul Mackerras, Michael Ellerman
On Sat, Dec 08, 2018 at 03:36:52PM +0900, Masahiro Yamada wrote:
> x86 maintainers,
>
> Ping.
You got the required ACKs. If you want me to carry this one and the
UML one through the tip tree, lemme know. Or you can do what Richard
suggested. Your call.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-12-08 11:33 ` Borislav Petkov
0 siblings, 0 replies; 26+ messages in thread
From: Borislav Petkov @ 2018-12-08 11:33 UTC (permalink / raw)
To: Masahiro Yamada
Cc: X86 ML, Linux Kernel Mailing List, Ingo Molnar, Paul Mackerras,
H. Peter Anvin, Thomas Gleixner, Richard Weinberger,
linuxppc-dev
On Sat, Dec 08, 2018 at 03:36:52PM +0900, Masahiro Yamada wrote:
> x86 maintainers,
>
> Ping.
You got the required ACKs. If you want me to carry this one and the
UML one through the tip tree, lemme know. Or you can do what Richard
suggested. Your call.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
2018-12-08 11:33 ` Borislav Petkov
@ 2018-12-08 19:17 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 19:17 UTC (permalink / raw)
To: Borislav Petkov
Cc: Ingo Molnar, Thomas Gleixner, X86 ML, Richard Weinberger,
linuxppc-dev, H. Peter Anvin, Benjamin Herrenschmidt,
Linux Kernel Mailing List, Paul Mackerras, Michael Ellerman
Hi Borislav,
On Sat, Dec 8, 2018 at 8:34 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Sat, Dec 08, 2018 at 03:36:52PM +0900, Masahiro Yamada wrote:
> > x86 maintainers,
> >
> > Ping.
>
> You got the required ACKs. If you want me to carry this one and the
> UML one through the tip tree, lemme know. Or you can do what Richard
> suggested. Your call.
Thank you for your help.
I expect both applied through the tip bot.
Thanks.
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> Good mailing practices for 400: avoid top-posting and trim the reply.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely
@ 2018-12-08 19:17 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 19:17 UTC (permalink / raw)
To: Borislav Petkov
Cc: X86 ML, Linux Kernel Mailing List, Ingo Molnar, Paul Mackerras,
H. Peter Anvin, Thomas Gleixner, Richard Weinberger,
linuxppc-dev
Hi Borislav,
On Sat, Dec 8, 2018 at 8:34 PM Borislav Petkov <bp@alien8.de> wrote:
>
> On Sat, Dec 08, 2018 at 03:36:52PM +0900, Masahiro Yamada wrote:
> > x86 maintainers,
> >
> > Ping.
>
> You got the required ACKs. If you want me to carry this one and the
> UML one through the tip tree, lemme know. Or you can do what Richard
> suggested. Your call.
Thank you for your help.
I expect both applied through the tip bot.
Thanks.
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> Good mailing practices for 400: avoid top-posting and trim the reply.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-12-08 8:54 ` Richard Weinberger
@ 2018-12-08 19:18 ` Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 19:18 UTC (permalink / raw)
To: Richard Weinberger
Cc: Ingo Molnar, X86 ML, Thomas Gleixner, linuxppc-dev,
Michael Ellerman, H. Peter Anvin, Borislav Petkov,
Linux Kernel Mailing List
Hi Richard,
On Sat, Dec 8, 2018 at 5:55 PM Richard Weinberger <richard@nod.at> wrote:
>
> Am Samstag, 8. Dezember 2018, 07:35:47 CET schrieb Masahiro Yamada:
> > x86 maintainers,
> >
> >
> > Ping.
>
> I thought you carry this via your kbuild tree.
> That said, I can merge it also via the um tree.
> x86 is of course also fine. :-)
The second patch also touches x86 Makefiles.
So, I think both should be applied to x86 tree.
Thanks.
> >
> >
> > On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
> > >
> > > Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > > > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > > > bumped the minimum GCC version to 4.6 for all architectures.
> > > >
> > > > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > > > '$(cc-version) -lt 0400' is always false.
> > > >
> > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > > ---
> > > >
> > > > arch/x86/Makefile.um | 8 ++------
> > > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > > > index 91085a0..577976b 100644
> > > > --- a/arch/x86/Makefile.um
> > > > +++ b/arch/x86/Makefile.um
> > > > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > > > # an unresolved reference.
> > > > cflags-y += -ffreestanding
> > > >
> > > > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > > > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > > > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > > > - echo $(call cc-option,-fno-unit-at-a-time); \
> > > > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > > > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> > >
> > > Acked-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC
@ 2018-12-08 19:18 ` Masahiro Yamada
0 siblings, 0 replies; 26+ messages in thread
From: Masahiro Yamada @ 2018-12-08 19:18 UTC (permalink / raw)
To: Richard Weinberger
Cc: X86 ML, Linux Kernel Mailing List, Ingo Molnar, Borislav Petkov,
H. Peter Anvin, Thomas Gleixner, linuxppc-dev
Hi Richard,
On Sat, Dec 8, 2018 at 5:55 PM Richard Weinberger <richard@nod.at> wrote:
>
> Am Samstag, 8. Dezember 2018, 07:35:47 CET schrieb Masahiro Yamada:
> > x86 maintainers,
> >
> >
> > Ping.
>
> I thought you carry this via your kbuild tree.
> That said, I can merge it also via the um tree.
> x86 is of course also fine. :-)
The second patch also touches x86 Makefiles.
So, I think both should be applied to x86 tree.
Thanks.
> >
> >
> > On Tue, Nov 13, 2018 at 6:48 PM Richard Weinberger <richard@nod.at> wrote:
> > >
> > > Am Montag, 12. November 2018, 03:35:19 CET schrieb Masahiro Yamada:
> > > > Commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
> > > > bumped the minimum GCC version to 4.6 for all architectures.
> > > >
> > > > '$(call cc-option,-fno-unit-at-a-time)' is now dead code since
> > > > '$(cc-version) -lt 0400' is always false.
> > > >
> > > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > > ---
> > > >
> > > > arch/x86/Makefile.um | 8 ++------
> > > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
> > > > index 91085a0..577976b 100644
> > > > --- a/arch/x86/Makefile.um
> > > > +++ b/arch/x86/Makefile.um
> > > > @@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
> > > > # an unresolved reference.
> > > > cflags-y += -ffreestanding
> > > >
> > > > -# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
> > > > -# a lot more stack due to the lack of sharing of stacklots. Also, gcc
> > > > -# 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > > -KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
> > > > - echo $(call cc-option,-fno-unit-at-a-time); \
> > > > - else echo $(call cc-option,-funit-at-a-time); fi ;)
> > > > +# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
> > > > +KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
> > >
> > > Acked-by: Richard Weinberger <richard@nod.at>
>
> Thanks,
> //richard
>
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 26+ messages in thread
* [tip:x86/build] x86/um: Remove -fno-unit-at-a-time workaround for pre-4.0 GCC
2018-11-12 2:35 ` Masahiro Yamada
(?)
(?)
@ 2018-12-09 11:06 ` tip-bot for Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Masahiro Yamada @ 2018-12-09 11:06 UTC (permalink / raw)
To: linux-tip-commits
Cc: bp, richard, mpe, x86, hpa, tglx, mingo, yamada.masahiro,
linux-kernel, mingo
Commit-ID: 829889ac4a7d26858860c297e64051bd27ce8fbe
Gitweb: https://git.kernel.org/tip/829889ac4a7d26858860c297e64051bd27ce8fbe
Author: Masahiro Yamada <yamada.masahiro@socionext.com>
AuthorDate: Mon, 12 Nov 2018 11:35:19 +0900
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Sun, 9 Dec 2018 11:51:11 +0100
x86/um: Remove -fno-unit-at-a-time workaround for pre-4.0 GCC
Commit
cafa0010cd51 ("Raise the minimum required gcc version to 4.6")
bumped the minimum GCC version to 4.6 for all architectures.
'$(call cc-option,-fno-unit-at-a-time)' is now dead code since
'$(cc-version) -lt 0400' is always false. Remove it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Richard Weinberger <richard@nod.at>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/1541990120-9643-2-git-send-email-yamada.masahiro@socionext.com
---
arch/x86/Makefile.um | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 91085a08de6c..577976b7d1f8 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,12 +26,8 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
-# a lot more stack due to the lack of sharing of stacklots. Also, gcc
-# 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(shell if [ $(cc-version) -lt 0400 ] ; then \
- echo $(call cc-option,-fno-unit-at-a-time); \
- else echo $(call cc-option,-funit-at-a-time); fi ;)
+# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
+KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
KBUILD_CFLAGS += $(cflags-y)
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [tip:x86/build] x86, powerpc: Remove -funit-at-a-time compiler option entirely
2018-11-12 2:35 ` Masahiro Yamada
` (2 preceding siblings ...)
(?)
@ 2018-12-09 11:07 ` tip-bot for Masahiro Yamada
-1 siblings, 0 replies; 26+ messages in thread
From: tip-bot for Masahiro Yamada @ 2018-12-09 11:07 UTC (permalink / raw)
To: linux-tip-commits
Cc: bp, paulus, hpa, mpe, tglx, yamada.masahiro, mingo, richard, x86,
benh, linux-kernel
Commit-ID: 63fea0af43af5beb3779fd2cae078d5d77b4bb11
Gitweb: https://git.kernel.org/tip/63fea0af43af5beb3779fd2cae078d5d77b4bb11
Author: Masahiro Yamada <yamada.masahiro@socionext.com>
AuthorDate: Mon, 12 Nov 2018 11:35:20 +0900
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Sun, 9 Dec 2018 11:55:32 +0100
x86, powerpc: Remove -funit-at-a-time compiler option entirely
GCC 4.6 manual says:
-funit-at-a-time
This option is left for compatibility reasons. -funit-at-a-time has
no effect, while -fno-unit-at-a-time implies -fno-toplevel-reorder
and -fno-section-anchors. Enabled by default.
Remove it.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Richard Weinberger <richard@sigma-star.at>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/1541990120-9643-3-git-send-email-yamada.masahiro@socionext.com
---
arch/powerpc/Makefile | 4 ----
arch/x86/Makefile | 4 ----
arch/x86/Makefile.um | 5 -----
3 files changed, 13 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8a2ce14d68d0..854199c9ab7e 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -228,10 +228,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
KBUILD_CFLAGS += $(call cc-option,-mspe=no)
-# Enable unit-at-a-time mode when possible. It shrinks the
-# kernel considerably.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
# FIXME: the module load should be taught about the additional relocs
# generated by this.
# revert to pre-gcc-4.4 behaviour of .eh_frame
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f5d7f4134524..58d82e9dc36d 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -130,10 +130,6 @@ else
KBUILD_CFLAGS += -mno-red-zone
KBUILD_CFLAGS += -mcmodel=kernel
-
- # -funit-at-a-time shrinks the kernel .text considerably
- # unfortunately it makes reading oopses harder.
- KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
ifdef CONFIG_X86_X32
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um
index 577976b7d1f8..1db7913795f5 100644
--- a/arch/x86/Makefile.um
+++ b/arch/x86/Makefile.um
@@ -26,9 +26,6 @@ cflags-y += $(call cc-option,-mpreferred-stack-boundary=2)
# an unresolved reference.
cflags-y += -ffreestanding
-# gcc 4.3.0 needs -funit-at-a-time for extern inline functions.
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
-
KBUILD_CFLAGS += $(cflags-y)
else
@@ -50,6 +47,4 @@ ELF_FORMAT := elf64-x86-64
LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
LINK-y += -m64
-# Do unit-at-a-time unconditionally on x86_64, following the host
-KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
endif
^ permalink raw reply related [flat|nested] 26+ messages in thread
end of thread, other threads:[~2018-12-09 11:08 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 2:35 [PATCH 0/2] Remove -fno-unit-at-a-time and -funit-at-a-time compiler flags entirely Masahiro Yamada
2018-11-12 2:35 ` Masahiro Yamada
2018-11-12 2:35 ` [PATCH 1/2] um: remove -fno-unit-at-a-time workaround for pre-4.0 GCC Masahiro Yamada
2018-11-12 2:35 ` Masahiro Yamada
2018-11-13 9:47 ` Richard Weinberger
2018-11-13 9:47 ` Richard Weinberger
2018-12-08 6:35 ` Masahiro Yamada
2018-12-08 6:35 ` Masahiro Yamada
2018-12-08 8:54 ` Richard Weinberger
2018-12-08 8:54 ` Richard Weinberger
2018-12-08 19:18 ` Masahiro Yamada
2018-12-08 19:18 ` Masahiro Yamada
2018-12-09 11:06 ` [tip:x86/build] x86/um: Remove " tip-bot for Masahiro Yamada
2018-11-12 2:35 ` [PATCH 2/2] x86, powerpc: remove -funit-at-a-time compiler option entirely Masahiro Yamada
2018-11-12 2:35 ` Masahiro Yamada
2018-11-12 3:01 ` Ingo Molnar
2018-11-12 3:01 ` Ingo Molnar
2018-11-12 11:22 ` Michael Ellerman
2018-11-12 11:22 ` Michael Ellerman
2018-12-08 6:36 ` Masahiro Yamada
2018-12-08 6:36 ` Masahiro Yamada
2018-12-08 11:33 ` Borislav Petkov
2018-12-08 11:33 ` Borislav Petkov
2018-12-08 19:17 ` Masahiro Yamada
2018-12-08 19:17 ` Masahiro Yamada
2018-12-09 11:07 ` [tip:x86/build] x86, powerpc: Remove " tip-bot for Masahiro Yamada
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.