2021-12-13 10:16:15

by Tiezhu Yang

[permalink] [raw]
Subject: [PATCH v3 1/2] MIPS: SGI-IP22: Remove unnecessary check of GCC option

According to the document "Minimal requirements to compile the Kernel [1],
the minimal version of GCC is 5.1, -mr10k-cache-barrier=store is supported
with GCC 5.1 [2], so just remove the unnecessary check to fix the build
error [3]:

arch/mips/sgi-ip22/Platform:28: *** gcc doesn't support needed option -mr10k-cache-barrier=store. Stop.

[1] https://www.kernel.org/doc/html/latest/process/changes.html
[2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/MIPS-Options.html
[3] https://github.com/ClangBuiltLinux/linux/issues/1543

Reported-by: Ryutaroh Matsumoto <[email protected]>
Suggested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Tiezhu Yang <[email protected]>
---
arch/mips/sgi-ip22/Platform | 5 -----
1 file changed, 5 deletions(-)

diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
index 62fa30b..a4c46e3 100644
--- a/arch/mips/sgi-ip22/Platform
+++ b/arch/mips/sgi-ip22/Platform
@@ -23,10 +23,5 @@ endif
# be 16kb aligned or the handling of the current variable will break.
# Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
#
-ifdef CONFIG_SGI_IP28
- ifeq ($(call cc-option-yn,-march=r10000 -mr10k-cache-barrier=store), n)
- $(error gcc doesn't support needed option -mr10k-cache-barrier=store)
- endif
-endif
cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28
load-$(CONFIG_SGI_IP28) += 0xa800000020004000
--
2.1.0



2021-12-13 17:12:45

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] MIPS: SGI-IP22: Remove unnecessary check of GCC option

On Mon, Dec 13, 2021 at 05:57:56PM +0800, Tiezhu Yang wrote:
> According to the document "Minimal requirements to compile the Kernel [1],
> the minimal version of GCC is 5.1, -mr10k-cache-barrier=store is supported
> with GCC 5.1 [2], so just remove the unnecessary check to fix the build
> error [3]:
>
> arch/mips/sgi-ip22/Platform:28: *** gcc doesn't support needed option -mr10k-cache-barrier=store. Stop.
>
> [1] https://www.kernel.org/doc/html/latest/process/changes.html
> [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/MIPS-Options.html
> [3] https://github.com/ClangBuiltLinux/linux/issues/1543
>
> Reported-by: Ryutaroh Matsumoto <[email protected]>
> Suggested-by: Nathan Chancellor <[email protected]>
> Signed-off-by: Tiezhu Yang <[email protected]>

Thanks for sending this!

Reviewed-by: Nathan Chancellor <[email protected]>

> ---
> arch/mips/sgi-ip22/Platform | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
> index 62fa30b..a4c46e3 100644
> --- a/arch/mips/sgi-ip22/Platform
> +++ b/arch/mips/sgi-ip22/Platform
> @@ -23,10 +23,5 @@ endif
> # be 16kb aligned or the handling of the current variable will break.
> # Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
> #
> -ifdef CONFIG_SGI_IP28
> - ifeq ($(call cc-option-yn,-march=r10000 -mr10k-cache-barrier=store), n)
> - $(error gcc doesn't support needed option -mr10k-cache-barrier=store)
> - endif
> -endif
> cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28
> load-$(CONFIG_SGI_IP28) += 0xa800000020004000
> --
> 2.1.0
>

2021-12-14 01:31:28

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH v3 1/2] MIPS: SGI-IP22: Remove unnecessary check of GCC option

On Mon, Dec 13, 2021 at 6:58 PM Tiezhu Yang <[email protected]> wrote:
>
> According to the document "Minimal requirements to compile the Kernel [1],


[1] is the kernel document, so you do not need to refer to the URL.

You can say:

According to Documentation/process/changes.rst, ...



https://www.kernel.org/doc/html/latest is the moving target.
If you get access to this URL some years later, the min GCC
version may not be 5.1



Other than the nit,

Reviewed-by: Masahiro Yamada <[email protected]>




> the minimal version of GCC is 5.1, -mr10k-cache-barrier=store is supported
> with GCC 5.1 [2], so just remove the unnecessary check to fix the build
> error [3]:
>
> arch/mips/sgi-ip22/Platform:28: *** gcc doesn't support needed option -mr10k-cache-barrier=store. Stop.
>
> [1] https://www.kernel.org/doc/html/latest/process/changes.html
> [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/MIPS-Options.html
> [3] https://github.com/ClangBuiltLinux/linux/issues/1543
>
> Reported-by: Ryutaroh Matsumoto <[email protected]>
> Suggested-by: Nathan Chancellor <[email protected]>
> Signed-off-by: Tiezhu Yang <[email protected]>
> ---
> arch/mips/sgi-ip22/Platform | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/arch/mips/sgi-ip22/Platform b/arch/mips/sgi-ip22/Platform
> index 62fa30b..a4c46e3 100644
> --- a/arch/mips/sgi-ip22/Platform
> +++ b/arch/mips/sgi-ip22/Platform
> @@ -23,10 +23,5 @@ endif
> # be 16kb aligned or the handling of the current variable will break.
> # Simplified: what IP22 does at 128MB+ in ksegN, IP28 does at 512MB+ in xkphys
> #
> -ifdef CONFIG_SGI_IP28
> - ifeq ($(call cc-option-yn,-march=r10000 -mr10k-cache-barrier=store), n)
> - $(error gcc doesn't support needed option -mr10k-cache-barrier=store)
> - endif
> -endif
> cflags-$(CONFIG_SGI_IP28) += -mr10k-cache-barrier=store -I$(srctree)/arch/mips/include/asm/mach-ip28
> load-$(CONFIG_SGI_IP28) += 0xa800000020004000
> --
> 2.1.0
>


--
Best Regards
Masahiro Yamada