All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] csky fixes
@ 2021-09-17  4:38 Guenter Roeck
  2021-09-17  4:38 ` [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-09-17  4:38 UTC (permalink / raw)
  To: Guo Ren; +Cc: linux-csky, linux-kernel, Guenter Roeck

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(-)

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

* [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
  2021-09-17  4:38 [PATCH 0/3] csky fixes Guenter Roeck
@ 2021-09-17  4:38 ` Guenter Roeck
  2021-09-17  6:20   ` Guo Ren
  2021-09-17  4:38 ` [PATCH 2/3] csky: bitops: Remove duplicate __clear_bit define Guenter Roeck
  2021-09-17  4:38 ` [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST Guenter Roeck
  2 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2021-09-17  4:38 UTC (permalink / raw)
  To: Guo Ren; +Cc: linux-csky, linux-kernel, 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_POINTERS only if gcc supports it to
avoid the error.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/csky/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 9d4d898df76b..58ca3ef02bab 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -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


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

* [PATCH 2/3] csky: bitops: Remove duplicate __clear_bit define
  2021-09-17  4:38 [PATCH 0/3] csky fixes Guenter Roeck
  2021-09-17  4:38 ` [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it Guenter Roeck
@ 2021-09-17  4:38 ` Guenter Roeck
  2021-09-17  4:38 ` [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST Guenter Roeck
  2 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-09-17  4:38 UTC (permalink / raw)
  To: Guo Ren; +Cc: linux-csky, linux-kernel, Guenter Roeck

Building 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.

Fixes: 9248e52fec95 ("locking/atomic: simplify non-atomic wrappers")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/csky/include/asm/bitops.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/csky/include/asm/bitops.h b/arch/csky/include/asm/bitops.h
index 91818787d860..02b72a000767 100644
--- a/arch/csky/include/asm/bitops.h
+++ b/arch/csky/include/asm/bitops.h
@@ -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>
-- 
2.33.0


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

* [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST
  2021-09-17  4:38 [PATCH 0/3] csky fixes Guenter Roeck
  2021-09-17  4:38 ` [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it Guenter Roeck
  2021-09-17  4:38 ` [PATCH 2/3] csky: bitops: Remove duplicate __clear_bit define Guenter Roeck
@ 2021-09-17  4:38 ` Guenter Roeck
  2021-09-17  6:19   ` Guo Ren
  2 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2021-09-17  4:38 UTC (permalink / raw)
  To: Guo Ren; +Cc: linux-csky, linux-kernel, Guenter Roeck

Building 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.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/csky/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
index 58ca3ef02bab..823d3d5a9e11 100644
--- a/arch/csky/Kconfig
+++ b/arch/csky/Kconfig
@@ -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


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

* Re: [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST
  2021-09-17  4:38 ` [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST Guenter Roeck
@ 2021-09-17  6:19   ` Guo Ren
  0 siblings, 0 replies; 6+ messages in thread
From: Guo Ren @ 2021-09-17  6:19 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-csky, Linux Kernel Mailing List

Acked, thx. It'll in next-tree.

On Fri, Sep 17, 2021 at 12:38 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Building 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.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  arch/csky/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index 58ca3ef02bab..823d3d5a9e11 100644
> --- a/arch/csky/Kconfig
> +++ b/arch/csky/Kconfig
> @@ -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
>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

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

* Re: [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it
  2021-09-17  4:38 ` [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it Guenter Roeck
@ 2021-09-17  6:20   ` Guo Ren
  0 siblings, 0 replies; 6+ messages in thread
From: Guo Ren @ 2021-09-17  6:20 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-csky, Linux Kernel Mailing List

Acked, thx. It'll in next-tree.

On Fri, Sep 17, 2021 at 12:38 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> 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.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  arch/csky/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index 9d4d898df76b..58ca3ef02bab 100644
> --- a/arch/csky/Kconfig
> +++ b/arch/csky/Kconfig
> @@ -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
>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

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

end of thread, other threads:[~2021-09-17  6:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  4:38 [PATCH 0/3] csky fixes Guenter Roeck
2021-09-17  4:38 ` [PATCH 1/3] csky: Select ARCH_WANT_FRAME_POINTERS only if compiler supports it Guenter Roeck
2021-09-17  6:20   ` Guo Ren
2021-09-17  4:38 ` [PATCH 2/3] csky: bitops: Remove duplicate __clear_bit define Guenter Roeck
2021-09-17  4:38 ` [PATCH 3/3] csky: Make HAVE_TCM depend on !COMPILE_TEST Guenter Roeck
2021-09-17  6:19   ` Guo Ren

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.