lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 May 2022 12:59:02 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Guo Ren <guoren@...nel.org>, linux-csky@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Masahiro Yamada <masahiroy@...nel.org>
Subject: [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2

This is useful to clean up Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.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
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ