Remove checks for gcc < 4
Subsystems (2)
v2 cover Remove checks for gcc < 4
Hi all,
This patch removes the few remaining checks for gcc < 4, which is no longer supported for building the kernel.
All three patches can be applied independently.
Changes compared to v1:
- Add Acked-by,
- Drop applied patch.
Thanks!
Geert Uytterhoeven (3):
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()
arch/arm/include/asm/div64.h | 11 ----------- arch/arm/include/asm/unified.h | 4 ---- include/asm-generic/div64.h | 14 ++++---------- 3 files changed, 4 insertions(+), 25 deletions(-)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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 TorvaldsPATCH v2 1/3 ARM: div64: Remove always-true __div64_const32_is_OK() duplicate
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.
---
v2:
- No changes.
arch/arm/include/asm/div64.h | 11 ----------- 1 file changed, 11 deletions(-)
arch/arm/include/asm/div64.h +0 -11
@@ -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;
Signature · 1 line
2.25.1
PATCH v2 3/3 asm-generic: div64: Remove always-true __div64_const32_is_OK()
In reply to Geert UytterhoevenSince 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.
---
v2:
- Add Acked-by.
--- include/asm-generic/div64.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
include/asm-generic/div64.h +4 -10
@@ -57,17 +57,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) \ ({ \/* \
@@ -230,8 +224,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); \
@@ -241,8 +234,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; \ })
Signature · 1 line
2.25.1
PATCH v2 2/3 ARM: unified: Remove check for gcc < 4
In reply to Geert UytterhoevenSince 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.
---
v2:
- No changes.
arch/arm/include/asm/unified.h | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/include/asm/unified.h +0 -4
@@ -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
Signature · 1 line
2.25.1