From: Guo Ren <guoren@kernel.org>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-csky@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2
Date: Fri, 13 May 2022 14:57:44 +0800 [thread overview]
Message-ID: <CAJF2gTTWo2XGsov7HLdjj60YrrSUCVJ3xzW5=g9Xyr7Q8Tsq4A@mail.gmail.com> (raw)
In-Reply-To: <20220512035903.2779287-3-masahiroy@kernel.org>
On Thu, May 12, 2022 at 12:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This is useful to clean up Makefile.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/csky/Kconfig | 11 +++++++++++
> arch/csky/Makefile | 14 ++++++++------
> 2 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig
> index 75ef86605d69..da756ecf0f85 100644
> --- a/arch/csky/Kconfig
> +++ b/arch/csky/Kconfig
> @@ -161,6 +161,12 @@ config ARCH_MMAP_RND_BITS_MIN
> config ARCH_MMAP_RND_BITS_MAX
> default 17
>
> +config CSKY_ABI_V1
> + bool
> +
> +config CSKY_ABI_V2
> + bool
> +
> menu "Processor type and features"
>
> choice
> @@ -172,15 +178,18 @@ config CPU_CK610
> select CPU_NEED_TLBSYNC
> select CPU_NEED_SOFTALIGN
> select CPU_NO_USER_BKPT
> + select CSKY_ABI_V1
>
> config CPU_CK810
> bool "CSKY CPU ck810"
> select CPU_HAS_HILO
> select CPU_NEED_TLBSYNC
> + select CSKY_ABI_V2
>
> config CPU_CK807
> bool "CSKY CPU ck807"
> select CPU_HAS_HILO
> + select CSKY_ABI_V2
>
> config CPU_CK860
> bool "CSKY CPU ck860"
> @@ -188,6 +197,8 @@ config CPU_CK860
> select CPU_HAS_CACHEV2
> select CPU_HAS_LDSTEX
> select CPU_HAS_FPUV2
> + select CSKY_ABI_V2
> +
> endchoice
>
> choice
> diff --git a/arch/csky/Makefile b/arch/csky/Makefile
> index 4d72aca4069b..2b30525f39e1 100644
> --- a/arch/csky/Makefile
> +++ b/arch/csky/Makefile
> @@ -16,34 +16,36 @@ endif
>
> ifdef CONFIG_CPU_CK610
> CPUTYPE = ck610
> -CSKYABI = abiv1
> endif
>
> ifdef CONFIG_CPU_CK810
> CPUTYPE = ck810
> -CSKYABI = abiv2
> endif
>
> ifdef CONFIG_CPU_CK807
> CPUTYPE = ck807
> -CSKYABI = abiv2
> endif
>
> ifdef CONFIG_CPU_CK860
> CPUTYPE = ck860
> +endif
> +
> +ifdef CONFIG_CSKY_ABI_V1
> +CSKYABI = abiv1
> +endif
> +
> +ifdef CONFIG_CSKY_ABI_V2
> CSKYABI = abiv2
We still need CSKYABI, so I don't think adding CONFIG_CSKY_ABI_V2 is
necessary. And ck807 & ck860 have different ABI.
> endif
>
> -ifneq ($(CSKYABI),)
> MCPU_STR = $(CPUTYPE)$(FPUEXT)$(VDSPEXT)$(TEEEXT)
> KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$(MCPU_STR)
> KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME=\"$(MCPU_STR)\"
> KBUILD_CFLAGS += -msoft-float -mdiv
> KBUILD_CFLAGS += -fno-tree-vectorize
> -endif
>
> KBUILD_CFLAGS += -pipe
> -ifeq ($(CSKYABI),abiv2)
> +ifdef CONFIG_CSKY_ABI_V2
> KBUILD_CFLAGS += -mno-stack-size
> endif
>
> --
> 2.32.0
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
next prev parent reply other threads:[~2022-05-13 6:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 3:59 [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile Masahiro Yamada
2022-05-12 3:59 ` [PATCH 2/4] csky: do not add dts/ to core-y Masahiro Yamada
2022-05-13 6:43 ` Guo Ren
2022-05-12 3:59 ` [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2 Masahiro Yamada
2022-05-13 6:57 ` Guo Ren [this message]
2022-05-13 8:28 ` Masahiro Yamada
2022-05-13 8:51 ` Guo Ren
2022-05-12 3:59 ` [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild Masahiro Yamada
2022-05-13 3:27 ` Masahiro Yamada
2022-05-13 6:44 ` Guo Ren
2022-05-13 6:43 ` [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile Guo Ren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJF2gTTWo2XGsov7HLdjj60YrrSUCVJ3xzW5=g9Xyr7Q8Tsq4A@mail.gmail.com' \
--to=guoren@kernel.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).