All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Remove checks for gcc < 4
@ 2021-02-10 14:11 ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel, Geert Uytterhoeven

	Hi all,

This patch removes the few remaining checks for gcc < 4, which is no
longer supported for building the kernel.

All four patches can be applied independently.

Thanks!

Geert Uytterhoeven (4):
  ARM: div64: Remove always-true __div64_const32_is_OK() duplicate
  ARM: unified: Remove check for gcc < 4
  asm-generic: div64: Remove always-true __div64_const32_is_OK()
  microblaze: Remove support for gcc < 4

 arch/arm/include/asm/div64.h    | 11 -----------
 arch/arm/include/asm/unified.h  |  4 ----
 arch/microblaze/kernel/module.c | 26 --------------------------
 include/asm-generic/div64.h     | 14 ++++----------
 4 files changed, 4 insertions(+), 51 deletions(-)

-- 
2.25.1

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. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 0/4] Remove checks for gcc < 4
@ 2021-02-10 14:11 ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arch, Geert Uytterhoeven, linux-kernel, linux-arm-kernel

	Hi all,

This patch removes the few remaining checks for gcc < 4, which is no
longer supported for building the kernel.

All four patches can be applied independently.

Thanks!

Geert Uytterhoeven (4):
  ARM: div64: Remove always-true __div64_const32_is_OK() duplicate
  ARM: unified: Remove check for gcc < 4
  asm-generic: div64: Remove always-true __div64_const32_is_OK()
  microblaze: Remove support for gcc < 4

 arch/arm/include/asm/div64.h    | 11 -----------
 arch/arm/include/asm/unified.h  |  4 ----
 arch/microblaze/kernel/module.c | 26 --------------------------
 include/asm-generic/div64.h     | 14 ++++----------
 4 files changed, 4 insertions(+), 51 deletions(-)

-- 
2.25.1

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. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

_______________________________________________
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] 14+ messages in thread

* [PATCH 1/4] ARM: div64: Remove always-true __div64_const32_is_OK() duplicate
  2021-02-10 14:11 ` Geert Uytterhoeven
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel, Geert Uytterhoeven

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence __div64_const32_is_OK() is always true.

Moreover, __div64_const32_is_OK() is defined in the same way in
include/asm-generic/div64.h, so the ARM-specific definition can be
removed regardless.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/include/asm/div64.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
index 595e538f5bfb5055..4b69cf850451b076 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -52,17 +52,6 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 
 #else
 
-/*
- * gcc versions earlier than 4.0 are simply too problematic for the
- * __div64_const32() code in asm-generic/div64.h. First there is
- * gcc PR 15089 that tend to trig on more complex constructs, spurious
- * .global __udivsi3 are inserted even if none of those symbols are
- * referenced in the generated code, and those gcc versions are not able
- * to do constant propagation on long long values anyway.
- */
-
-#define __div64_const32_is_OK (__GNUC__ >= 4)
-
 static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias)
 {
 	unsigned long long res;
-- 
2.25.1


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

* [PATCH 1/4] ARM: div64: Remove always-true __div64_const32_is_OK() duplicate
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arch, Geert Uytterhoeven, linux-kernel, linux-arm-kernel

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence __div64_const32_is_OK() is always true.

Moreover, __div64_const32_is_OK() is defined in the same way in
include/asm-generic/div64.h, so the ARM-specific definition can be
removed regardless.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/include/asm/div64.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
index 595e538f5bfb5055..4b69cf850451b076 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -52,17 +52,6 @@ static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
 
 #else
 
-/*
- * gcc versions earlier than 4.0 are simply too problematic for the
- * __div64_const32() code in asm-generic/div64.h. First there is
- * gcc PR 15089 that tend to trig on more complex constructs, spurious
- * .global __udivsi3 are inserted even if none of those symbols are
- * referenced in the generated code, and those gcc versions are not able
- * to do constant propagation on long long values anyway.
- */
-
-#define __div64_const32_is_OK (__GNUC__ >= 4)
-
 static inline uint64_t __arch_xprod_64(uint64_t m, uint64_t n, bool bias)
 {
 	unsigned long long res;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/4] ARM: unified: Remove check for gcc < 4
  2021-02-10 14:11 ` Geert Uytterhoeven
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel, Geert Uytterhoeven

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence this condition is never true, and the check can thus be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/include/asm/unified.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index 1e2c3eb043535f7b..ce9689118dbb945b 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -24,10 +24,6 @@ __asm__(".syntax unified");
 
 #ifdef CONFIG_THUMB2_KERNEL
 
-#if __GNUC__ < 4
-#error Thumb-2 kernel requires gcc >= 4
-#endif
-
 /* The CPSR bit describing the instruction set (Thumb) */
 #define PSR_ISETSTATE	PSR_T_BIT
 
-- 
2.25.1


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

* [PATCH 2/4] ARM: unified: Remove check for gcc < 4
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arch, Geert Uytterhoeven, linux-kernel, linux-arm-kernel

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence this condition is never true, and the check can thus be removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/include/asm/unified.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index 1e2c3eb043535f7b..ce9689118dbb945b 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -24,10 +24,6 @@ __asm__(".syntax unified");
 
 #ifdef CONFIG_THUMB2_KERNEL
 
-#if __GNUC__ < 4
-#error Thumb-2 kernel requires gcc >= 4
-#endif
-
 /* The CPSR bit describing the instruction set (Thumb) */
 #define PSR_ISETSTATE	PSR_T_BIT
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK()
  2021-02-10 14:11 ` Geert Uytterhoeven
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel, Geert Uytterhoeven

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence __div64_const32_is_OK() is always true, and the corresponding
check can thus be removed.

While at it, remove the whitespace error that hurts my eyes, and add the
missing curly braces for the final else statement, as per coding style.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/asm-generic/div64.h | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index a3b98c86f077482d..10a8b1342fb0387b 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -55,17 +55,11 @@
 /*
  * If the divisor happens to be constant, we determine the appropriate
  * inverse at compile time to turn the division into a few inline
- * multiplications which ought to be much faster. And yet only if compiling
- * with a sufficiently recent gcc version to perform proper 64-bit constant
- * propagation.
+ * multiplications which ought to be much faster.
  *
  * (It is unfortunate that gcc doesn't perform all this internally.)
  */
 
-#ifndef __div64_const32_is_OK
-#define __div64_const32_is_OK (__GNUC__ >= 4)
-#endif
-
 #define __div64_const32(n, ___b)					\
 ({									\
 	/*								\
@@ -228,8 +222,7 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 	    is_power_of_2(__base)) {			\
 		__rem = (n) & (__base - 1);		\
 		(n) >>= ilog2(__base);			\
-	} else if (__div64_const32_is_OK &&		\
-		   __builtin_constant_p(__base) &&	\
+	} else if (__builtin_constant_p(__base) &&	\
 		   __base != 0) {			\
 		uint32_t __res_lo, __n_lo = (n);	\
 		(n) = __div64_const32(n, __base);	\
@@ -239,8 +232,9 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 	} else if (likely(((n) >> 32) == 0)) {		\
 		__rem = (uint32_t)(n) % __base;		\
 		(n) = (uint32_t)(n) / __base;		\
-	} else 						\
+	} else {					\
 		__rem = __div64_32(&(n), __base);	\
+	}						\
 	__rem;						\
  })
 
-- 
2.25.1


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

* [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK()
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arch, Geert Uytterhoeven, linux-kernel, linux-arm-kernel

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6"), the kernel can no longer be compiled using gcc-3.
Hence __div64_const32_is_OK() is always true, and the corresponding
check can thus be removed.

While at it, remove the whitespace error that hurts my eyes, and add the
missing curly braces for the final else statement, as per coding style.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/asm-generic/div64.h | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index a3b98c86f077482d..10a8b1342fb0387b 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -55,17 +55,11 @@
 /*
  * If the divisor happens to be constant, we determine the appropriate
  * inverse at compile time to turn the division into a few inline
- * multiplications which ought to be much faster. And yet only if compiling
- * with a sufficiently recent gcc version to perform proper 64-bit constant
- * propagation.
+ * multiplications which ought to be much faster.
  *
  * (It is unfortunate that gcc doesn't perform all this internally.)
  */
 
-#ifndef __div64_const32_is_OK
-#define __div64_const32_is_OK (__GNUC__ >= 4)
-#endif
-
 #define __div64_const32(n, ___b)					\
 ({									\
 	/*								\
@@ -228,8 +222,7 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 	    is_power_of_2(__base)) {			\
 		__rem = (n) & (__base - 1);		\
 		(n) >>= ilog2(__base);			\
-	} else if (__div64_const32_is_OK &&		\
-		   __builtin_constant_p(__base) &&	\
+	} else if (__builtin_constant_p(__base) &&	\
 		   __base != 0) {			\
 		uint32_t __res_lo, __n_lo = (n);	\
 		(n) = __div64_const32(n, __base);	\
@@ -239,8 +232,9 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
 	} else if (likely(((n) >> 32) == 0)) {		\
 		__rem = (uint32_t)(n) % __base;		\
 		(n) = (uint32_t)(n) / __base;		\
-	} else 						\
+	} else {					\
 		__rem = __div64_32(&(n), __base);	\
+	}						\
 	__rem;						\
  })
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 4/4] microblaze: Remove support for gcc < 4
  2021-02-10 14:11 ` Geert Uytterhoeven
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  -1 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel, Geert Uytterhoeven

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6") , the kernel can no longer be compiled using gcc-3.
Hence drop support code for gcc-3.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/microblaze/kernel/module.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c
index 9f12e3c2bb42a319..e5db3a57b9e30d9e 100644
--- a/arch/microblaze/kernel/module.c
+++ b/arch/microblaze/kernel/module.c
@@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
 	Elf32_Sym *sym;
 	unsigned long int *location;
 	unsigned long int value;
-#if __GNUC__ < 4
-	unsigned long int old_value;
-#endif
 
 	pr_debug("Applying add relocation section %u to %u\n",
 		relsec, sechdrs[relsec].sh_info);
@@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
 		 */
 
 		case R_MICROBLAZE_32:
-#if __GNUC__ < 4
-			old_value = *location;
-			*location = value + old_value;
-
-			pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n",
-				old_value, value);
-#else
 			*location = value;
-#endif
 			break;
 
 		case R_MICROBLAZE_64:
-#if __GNUC__ < 4
-			/* Split relocs only required/used pre gcc4.1.1 */
-			old_value = ((location[0] & 0x0000FFFF) << 16) |
-					(location[1] & 0x0000FFFF);
-			value += old_value;
-#endif
 			location[0] = (location[0] & 0xFFFF0000) |
 					(value >> 16);
 			location[1] = (location[1] & 0xFFFF0000) |
 					(value & 0xFFFF);
-#if __GNUC__ < 4
-			pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n",
-				old_value, value);
-#endif
 			break;
 
 		case R_MICROBLAZE_64_PCREL:
-#if __GNUC__ < 4
-			old_value = (location[0] & 0xFFFF) << 16 |
-				(location[1] & 0xFFFF);
-			value -= old_value;
-#endif
 			value -= (unsigned long int)(location) + 4;
 			location[0] = (location[0] & 0xFFFF0000) |
 					(value >> 16);
-- 
2.25.1


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

* [PATCH 4/4] microblaze: Remove support for gcc < 4
@ 2021-02-10 14:11   ` Geert Uytterhoeven
  0 siblings, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2021-02-10 14:11 UTC (permalink / raw)
  To: Russell King, Michal Simek, Arnd Bergmann
  Cc: linux-arch, Geert Uytterhoeven, linux-kernel, linux-arm-kernel

Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
to 4.6") , the kernel can no longer be compiled using gcc-3.
Hence drop support code for gcc-3.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/microblaze/kernel/module.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c
index 9f12e3c2bb42a319..e5db3a57b9e30d9e 100644
--- a/arch/microblaze/kernel/module.c
+++ b/arch/microblaze/kernel/module.c
@@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
 	Elf32_Sym *sym;
 	unsigned long int *location;
 	unsigned long int value;
-#if __GNUC__ < 4
-	unsigned long int old_value;
-#endif
 
 	pr_debug("Applying add relocation section %u to %u\n",
 		relsec, sechdrs[relsec].sh_info);
@@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
 		 */
 
 		case R_MICROBLAZE_32:
-#if __GNUC__ < 4
-			old_value = *location;
-			*location = value + old_value;
-
-			pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n",
-				old_value, value);
-#else
 			*location = value;
-#endif
 			break;
 
 		case R_MICROBLAZE_64:
-#if __GNUC__ < 4
-			/* Split relocs only required/used pre gcc4.1.1 */
-			old_value = ((location[0] & 0x0000FFFF) << 16) |
-					(location[1] & 0x0000FFFF);
-			value += old_value;
-#endif
 			location[0] = (location[0] & 0xFFFF0000) |
 					(value >> 16);
 			location[1] = (location[1] & 0xFFFF0000) |
 					(value & 0xFFFF);
-#if __GNUC__ < 4
-			pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n",
-				old_value, value);
-#endif
 			break;
 
 		case R_MICROBLAZE_64_PCREL:
-#if __GNUC__ < 4
-			old_value = (location[0] & 0xFFFF) << 16 |
-				(location[1] & 0xFFFF);
-			value -= old_value;
-#endif
 			value -= (unsigned long int)(location) + 4;
 			location[0] = (location[0] & 0xFFFF0000) |
 					(value >> 16);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK()
  2021-02-10 14:11   ` Geert Uytterhoeven
@ 2021-02-10 15:11     ` Arnd Bergmann
  -1 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2021-02-10 15:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Russell King, Michal Simek, Arnd Bergmann, Linux ARM, linux-arch,
	linux-kernel

On Wed, Feb 10, 2021 at 3:11 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
> to 4.6"), the kernel can no longer be compiled using gcc-3.
> Hence __div64_const32_is_OK() is always true, and the corresponding
> check can thus be removed.
>
> While at it, remove the whitespace error that hurts my eyes, and add the
> missing curly braces for the final else statement, as per coding style.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  include/asm-generic/div64.h | 14 ++++----------

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK()
@ 2021-02-10 15:11     ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2021-02-10 15:11 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-arch, Michal Simek, Arnd Bergmann, Russell King,
	linux-kernel, Linux ARM

On Wed, Feb 10, 2021 at 3:11 PM Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
> to 4.6"), the kernel can no longer be compiled using gcc-3.
> Hence __div64_const32_is_OK() is always true, and the corresponding
> check can thus be removed.
>
> While at it, remove the whitespace error that hurts my eyes, and add the
> missing curly braces for the final else statement, as per coding style.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  include/asm-generic/div64.h | 14 ++++----------

Acked-by: Arnd Bergmann <arnd@arndb.de>

_______________________________________________
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] 14+ messages in thread

* Re: [PATCH 4/4] microblaze: Remove support for gcc < 4
  2021-02-10 14:11   ` Geert Uytterhoeven
@ 2021-02-11 17:55     ` Michal Simek
  -1 siblings, 0 replies; 14+ messages in thread
From: Michal Simek @ 2021-02-11 17:55 UTC (permalink / raw)
  To: Geert Uytterhoeven, Russell King, Arnd Bergmann
  Cc: linux-arm-kernel, linux-arch, linux-kernel



On 2/10/21 3:11 PM, Geert Uytterhoeven wrote:
> Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
> to 4.6") , the kernel can no longer be compiled using gcc-3.
> Hence drop support code for gcc-3.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/microblaze/kernel/module.c | 26 --------------------------
>  1 file changed, 26 deletions(-)
> 
> diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c
> index 9f12e3c2bb42a319..e5db3a57b9e30d9e 100644
> --- a/arch/microblaze/kernel/module.c
> +++ b/arch/microblaze/kernel/module.c
> @@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
>  	Elf32_Sym *sym;
>  	unsigned long int *location;
>  	unsigned long int value;
> -#if __GNUC__ < 4
> -	unsigned long int old_value;
> -#endif
>  
>  	pr_debug("Applying add relocation section %u to %u\n",
>  		relsec, sechdrs[relsec].sh_info);
> @@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
>  		 */
>  
>  		case R_MICROBLAZE_32:
> -#if __GNUC__ < 4
> -			old_value = *location;
> -			*location = value + old_value;
> -
> -			pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n",
> -				old_value, value);
> -#else
>  			*location = value;
> -#endif
>  			break;
>  
>  		case R_MICROBLAZE_64:
> -#if __GNUC__ < 4
> -			/* Split relocs only required/used pre gcc4.1.1 */
> -			old_value = ((location[0] & 0x0000FFFF) << 16) |
> -					(location[1] & 0x0000FFFF);
> -			value += old_value;
> -#endif
>  			location[0] = (location[0] & 0xFFFF0000) |
>  					(value >> 16);
>  			location[1] = (location[1] & 0xFFFF0000) |
>  					(value & 0xFFFF);
> -#if __GNUC__ < 4
> -			pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n",
> -				old_value, value);
> -#endif
>  			break;
>  
>  		case R_MICROBLAZE_64_PCREL:
> -#if __GNUC__ < 4
> -			old_value = (location[0] & 0xFFFF) << 16 |
> -				(location[1] & 0xFFFF);
> -			value -= old_value;
> -#endif
>  			value -= (unsigned long int)(location) + 4;
>  			location[0] = (location[0] & 0xFFFF0000) |
>  					(value >> 16);
> 

Applied.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs



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

* Re: [PATCH 4/4] microblaze: Remove support for gcc < 4
@ 2021-02-11 17:55     ` Michal Simek
  0 siblings, 0 replies; 14+ messages in thread
From: Michal Simek @ 2021-02-11 17:55 UTC (permalink / raw)
  To: Geert Uytterhoeven, Russell King, Arnd Bergmann
  Cc: linux-arch, linux-kernel, linux-arm-kernel



On 2/10/21 3:11 PM, Geert Uytterhoeven wrote:
> Since commit cafa0010cd51fb71 ("Raise the minimum required gcc version
> to 4.6") , the kernel can no longer be compiled using gcc-3.
> Hence drop support code for gcc-3.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  arch/microblaze/kernel/module.c | 26 --------------------------
>  1 file changed, 26 deletions(-)
> 
> diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c
> index 9f12e3c2bb42a319..e5db3a57b9e30d9e 100644
> --- a/arch/microblaze/kernel/module.c
> +++ b/arch/microblaze/kernel/module.c
> @@ -24,9 +24,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
>  	Elf32_Sym *sym;
>  	unsigned long int *location;
>  	unsigned long int value;
> -#if __GNUC__ < 4
> -	unsigned long int old_value;
> -#endif
>  
>  	pr_debug("Applying add relocation section %u to %u\n",
>  		relsec, sechdrs[relsec].sh_info);
> @@ -49,40 +46,17 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
>  		 */
>  
>  		case R_MICROBLAZE_32:
> -#if __GNUC__ < 4
> -			old_value = *location;
> -			*location = value + old_value;
> -
> -			pr_debug("R_MICROBLAZE_32 (%08lx->%08lx)\n",
> -				old_value, value);
> -#else
>  			*location = value;
> -#endif
>  			break;
>  
>  		case R_MICROBLAZE_64:
> -#if __GNUC__ < 4
> -			/* Split relocs only required/used pre gcc4.1.1 */
> -			old_value = ((location[0] & 0x0000FFFF) << 16) |
> -					(location[1] & 0x0000FFFF);
> -			value += old_value;
> -#endif
>  			location[0] = (location[0] & 0xFFFF0000) |
>  					(value >> 16);
>  			location[1] = (location[1] & 0xFFFF0000) |
>  					(value & 0xFFFF);
> -#if __GNUC__ < 4
> -			pr_debug("R_MICROBLAZE_64 (%08lx->%08lx)\n",
> -				old_value, value);
> -#endif
>  			break;
>  
>  		case R_MICROBLAZE_64_PCREL:
> -#if __GNUC__ < 4
> -			old_value = (location[0] & 0xFFFF) << 16 |
> -				(location[1] & 0xFFFF);
> -			value -= old_value;
> -#endif
>  			value -= (unsigned long int)(location) + 4;
>  			location[0] = (location[0] & 0xFFFF0000) |
>  					(value >> 16);
> 

Applied.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs



_______________________________________________
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] 14+ messages in thread

end of thread, other threads:[~2021-02-11 18:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10 14:11 [PATCH 0/4] Remove checks for gcc < 4 Geert Uytterhoeven
2021-02-10 14:11 ` Geert Uytterhoeven
2021-02-10 14:11 ` [PATCH 1/4] ARM: div64: Remove always-true __div64_const32_is_OK() duplicate Geert Uytterhoeven
2021-02-10 14:11   ` Geert Uytterhoeven
2021-02-10 14:11 ` [PATCH 2/4] ARM: unified: Remove check for gcc < 4 Geert Uytterhoeven
2021-02-10 14:11   ` Geert Uytterhoeven
2021-02-10 14:11 ` [PATCH 3/4] asm-generic: div64: Remove always-true __div64_const32_is_OK() Geert Uytterhoeven
2021-02-10 14:11   ` Geert Uytterhoeven
2021-02-10 15:11   ` Arnd Bergmann
2021-02-10 15:11     ` Arnd Bergmann
2021-02-10 14:11 ` [PATCH 4/4] microblaze: Remove support for gcc < 4 Geert Uytterhoeven
2021-02-10 14:11   ` Geert Uytterhoeven
2021-02-11 17:55   ` Michal Simek
2021-02-11 17:55     ` Michal Simek

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.