csky fixes
Subsystems (2)
cover csky fixes
The following series of patches enables building csky:allmodconfig with upstream gcc.
----------------------------------------------------------------
Guenter Roeck (3):
csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
csky: bitops: Remove duplicate __clear_bit define
csky: Make HAVE_TCM depend on !COMPILE_TEST
arch/csky/Kconfig | 3 ++- arch/csky/include/asm/bitops.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
PATCH 1/3 csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
Compiling csky:allmodconfig with an upstream C compiler results in the following error.
csky-linux-gcc: error:
unrecognized command-line option '-mbacktrace'; did you mean '-fbacktrace'?
Select ARCH_WANT_FRAME_POINTERS only if gcc supports it to avoid the error.
--- arch/csky/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/csky/Kconfig +1 -1
@@ -8,7 +8,7 @@ config CSKY select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_QUEUED_RWLOCKS - select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 + select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace) select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT select COMMON_CLK select CLKSRC_MMIO
Signature · 1 line
2.33.0
Guo Ren
maintainerRe: [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
Acked, thx. It'll in next-tree.
Quoted 32 lines · Guenter Roeck
Compiling csky:allmodconfig with an upstream C compiler results in the following error.
csky-linux-gcc: error:
unrecognized command-line option '-mbacktrace'; did you mean '-fbacktrace'?Select
ARCH_WANT_FRAME_POINTERSonly if gcc supports it to avoid the error.Signed-off-by Guenter Roeck <[email protected]>--- arch/csky/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/csky/Kconfig +1
-2@@ -8,7 +8,7 @@ config CSKY select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_QUEUED_RWLOCKS - select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 + select ARCH_WANT_FRAME_POINTERS if !CPU_CK610 && $(cc-option,-mbacktrace) select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT select COMMON_CLK select CLKSRC_MMIO --2.33.0
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/
PATCH 2/3 csky: bitops: Remove duplicate __clear_bit define
In reply to Guenter RoeckBuilding csky:allmodconfig results in the following build error.
In file included from ./include/linux/bitops.h:33,
from ./include/linux/log2.h:12,
from kernel/bounds.c:13:./arch/csky/include/asm/bitops.h:77: error: "__clear_bit" redefined
Since commit 9248e52fec95 ("locking/atomic: simplify non-atomic wrappers"), __clear_bit is defined in include/asm-generic/bitops/non-atomic.h, and the define in the csky include file is no longer necessary or useful. Remove it.
--- arch/csky/include/asm/bitops.h | 1 - 1 file changed, 1 deletion(-)
arch/csky/include/asm/bitops.h +0 -1
@@ -74,7 +74,6 @@ static __always_inline unsigned long __fls(unsigned long x)* bug fix, why only could use atomic!!!! */ #include <asm-generic/bitops/non-atomic.h> -#define __clear_bit (nr, vaddr) clear_bit(nr, vaddr)#include <asm-generic/bitops/le.h> #include <asm-generic/bitops/ext2-atomic.h>
Signature · 1 line
2.33.0
PATCH 3/3 csky: Make HAVE_TCM depend on !COMPILE_TEST
In reply to Guenter RoeckBuilding csky:allmodconfig results in the following build errors.
arch/csky/mm/tcm.c:9:2: error:
#error "You should define ITCM_RAM_BASE"
9 | #error "You should define ITCM_RAM_BASE"
| ^~~~~arch/csky/mm/tcm.c:14:2: error:
#error "You should define DTCM_RAM_BASE"
14 | #error "You should define DTCM_RAM_BASE"
| ^~~~~
arch/csky/mm/tcm.c:18:2: error:
#error "You should define correct DTCM_RAM_BASE"
18 | #error "You should define correct DTCM_RAM_BASE"
This is seen with compile tests since those enable HAVE_TCM, but do not provide useful default values for ITCM_RAM_BASE or DTCM_RAM_BASE. Disable HAVE_TCM for commpile tests to avoid the error.
--- arch/csky/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/csky/Kconfig +1 -0
@@ -241,6 +241,7 @@ endchoice menuconfig HAVE_TCM bool "Tightly-Coupled/Sram Memory" + depends on !COMPILE_TEST help The implementation are not only used by TCM (Tightly-Coupled Meory) but also used by sram on SOC bus. It follow existed linux tcm
Signature · 1 line
2.33.0
Guo Ren
maintainerRe: [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST
Acked, thx. It'll in next-tree.
Quoted 40 lines · Guenter Roeck
Building csky:allmodconfig results in the following build errors.
arch/csky/mm/tcm.c:9:2: error:
#error "You should defineITCM_RAM_BASE"
9 | #error "You should defineITCM_RAM_BASE"
| ^~~~~arch/csky/mm/tcm.c:14:2: error:
#error "You should defineDTCM_RAM_BASE"
14 | #error "You should defineDTCM_RAM_BASE"| ^~~~~
arch/csky/mm/tcm.c:18:2: error:
#error "You should define correctDTCM_RAM_BASE"
18 | #error "You should define correctDTCM_RAM_BASE"This is seen with compile tests since those enable
HAVE_TCM, but do not provide useful default values forITCM_RAM_BASEorDTCM_RAM_BASE. DisableHAVE_TCMfor commpile tests to avoid the error.Signed-off-by Guenter Roeck <[email protected]>--- arch/csky/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/csky/Kconfig +1
-1@@ -241,6 +241,7 @@ endchoice menuconfig HAVE_TCM bool "Tightly-Coupled/Sram Memory" + depends on !COMPILE_TEST help The implementation are not only used by TCM (Tightly-Coupled Meory) but also used by sram on SOC bus. It follow existed linux tcm --2.33.0
Signature · 4 lines
Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/