* [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile
@ 2022-05-12 3:59 Masahiro Yamada
2022-05-12 3:59 ` [PATCH 2/4] csky: do not add dts/ to core-y Masahiro Yamada
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-12 3:59 UTC (permalink / raw)
To: Guo Ren, linux-csky; +Cc: linux-kernel, Masahiro Yamada
arch/csky/boot/Makefile does not build DTB.
arch/csky/boot/dts/Makefile does.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/csky/boot/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/csky/boot/Makefile b/arch/csky/boot/Makefile
index dbc9b1bd72f0..c3cfde28f8e6 100644
--- a/arch/csky/boot/Makefile
+++ b/arch/csky/boot/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
targets := Image zImage uImage
-targets += $(dtb-y)
$(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy)
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/4] csky: do not add dts/ to core-y
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 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-12 3:59 UTC (permalink / raw)
To: Guo Ren, linux-csky; +Cc: linux-kernel, Masahiro Yamada
This line was used for embedding a DT into vmlinux.
Since commit c4c14c3bd177 ("csky: remove builtin-dtb Kbuild"),
DT for csky is just a separate blob.
It is covered by the generic rule in the top Makefile:
ifdef CONFIG_OF_EARLY_FLATTREE
all: dtbs
endif
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/csky/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/csky/Makefile b/arch/csky/Makefile
index 866805077636..4d72aca4069b 100644
--- a/arch/csky/Makefile
+++ b/arch/csky/Makefile
@@ -69,7 +69,6 @@ libs-y += arch/csky/lib/ \
$(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
boot := arch/csky/boot
-core-y += $(boot)/dts/
all: zImage
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2
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-12 3:59 ` Masahiro Yamada
2022-05-13 6:57 ` Guo Ren
2022-05-12 3:59 ` [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild Masahiro Yamada
2022-05-13 6:43 ` [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile Guo Ren
3 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-12 3:59 UTC (permalink / raw)
To: Guo Ren, linux-csky; +Cc: linux-kernel, Masahiro Yamada
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
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild
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-12 3:59 ` [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2 Masahiro Yamada
@ 2022-05-12 3:59 ` Masahiro Yamada
2022-05-13 3:27 ` Masahiro Yamada
2022-05-13 6:43 ` [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile Guo Ren
3 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-12 3:59 UTC (permalink / raw)
To: Guo Ren, linux-csky; +Cc: linux-kernel, Masahiro Yamada
Use the standard obj-y form to specify the sub-directories under
arch/csky/. No functional change intended.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/csky/Kbuild | 4 ++++
arch/csky/Makefile | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
index 4e39f7abdeb6..3015be1afd59 100644
--- a/arch/csky/Kbuild
+++ b/arch/csky/Kbuild
@@ -1,4 +1,8 @@
# SPDX-License-Identifier: GPL-2.0-only
+obj-y += kernel/ mm/
+obj-$(CONFIG_CPU_ABI_V1) += abiv1/
+obj-$(CONFIG_CPU_ABI_V2) += abiv2/
+
# for cleaning
subdir- += boot
diff --git a/arch/csky/Makefile b/arch/csky/Makefile
index 2b30525f39e1..51150abd2831 100644
--- a/arch/csky/Makefile
+++ b/arch/csky/Makefile
@@ -63,10 +63,6 @@ KBUILD_AFLAGS += $(KBUILD_CFLAGS)
head-y := arch/csky/kernel/head.o
-core-y += arch/csky/kernel/
-core-y += arch/csky/mm/
-core-y += arch/csky/$(CSKYABI)/
-
libs-y += arch/csky/lib/ \
$(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
--
2.32.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild
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
0 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-13 3:27 UTC (permalink / raw)
To: Guo Ren, linux-csky; +Cc: Linux Kernel Mailing List
On Thu, May 12, 2022 at 1:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Use the standard obj-y form to specify the sub-directories under
> arch/csky/. No functional change intended.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
I am not sending v2 just for typo "cskly:"
I hope the maintainer can fix it.
> arch/csky/Kbuild | 4 ++++
> arch/csky/Makefile | 4 ----
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> index 4e39f7abdeb6..3015be1afd59 100644
> --- a/arch/csky/Kbuild
> +++ b/arch/csky/Kbuild
> @@ -1,4 +1,8 @@
> # SPDX-License-Identifier: GPL-2.0-only
>
> +obj-y += kernel/ mm/
> +obj-$(CONFIG_CPU_ABI_V1) += abiv1/
> +obj-$(CONFIG_CPU_ABI_V2) += abiv2/
> +
> # for cleaning
> subdir- += boot
> diff --git a/arch/csky/Makefile b/arch/csky/Makefile
> index 2b30525f39e1..51150abd2831 100644
> --- a/arch/csky/Makefile
> +++ b/arch/csky/Makefile
> @@ -63,10 +63,6 @@ KBUILD_AFLAGS += $(KBUILD_CFLAGS)
>
> head-y := arch/csky/kernel/head.o
>
> -core-y += arch/csky/kernel/
> -core-y += arch/csky/mm/
> -core-y += arch/csky/$(CSKYABI)/
> -
> libs-y += arch/csky/lib/ \
> $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
>
> --
> 2.32.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile
2022-05-12 3:59 [PATCH 1/4] csky: remove unused $(dtb-y) from arch/csky/boot/Makefile Masahiro Yamada
` (2 preceding siblings ...)
2022-05-12 3:59 ` [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild Masahiro Yamada
@ 2022-05-13 6:43 ` Guo Ren
3 siblings, 0 replies; 11+ messages in thread
From: Guo Ren @ 2022-05-13 6:43 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-csky, Linux Kernel Mailing List
Thx, approved.
On Thu, May 12, 2022 at 12:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> arch/csky/boot/Makefile does not build DTB.
> arch/csky/boot/dts/Makefile does.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/csky/boot/Makefile | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/csky/boot/Makefile b/arch/csky/boot/Makefile
> index dbc9b1bd72f0..c3cfde28f8e6 100644
> --- a/arch/csky/boot/Makefile
> +++ b/arch/csky/boot/Makefile
> @@ -1,6 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0-only
> targets := Image zImage uImage
> -targets += $(dtb-y)
>
> $(obj)/Image: vmlinux FORCE
> $(call if_changed,objcopy)
> --
> 2.32.0
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/4] csky: do not add dts/ to core-y
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
0 siblings, 0 replies; 11+ messages in thread
From: Guo Ren @ 2022-05-13 6:43 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-csky, Linux Kernel Mailing List
Thx, approved.
On Thu, May 12, 2022 at 12:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> This line was used for embedding a DT into vmlinux.
>
> Since commit c4c14c3bd177 ("csky: remove builtin-dtb Kbuild"),
> DT for csky is just a separate blob.
>
> It is covered by the generic rule in the top Makefile:
>
> ifdef CONFIG_OF_EARLY_FLATTREE
> all: dtbs
> endif
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/csky/Makefile | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/csky/Makefile b/arch/csky/Makefile
> index 866805077636..4d72aca4069b 100644
> --- a/arch/csky/Makefile
> +++ b/arch/csky/Makefile
> @@ -69,7 +69,6 @@ libs-y += arch/csky/lib/ \
> $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
>
> boot := arch/csky/boot
> -core-y += $(boot)/dts/
>
> all: zImage
>
> --
> 2.32.0
>
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 4/4] cskly: move $(core-y) into arch/csky/Kbuild
2022-05-13 3:27 ` Masahiro Yamada
@ 2022-05-13 6:44 ` Guo Ren
0 siblings, 0 replies; 11+ messages in thread
From: Guo Ren @ 2022-05-13 6:44 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-csky, Linux Kernel Mailing List
On Fri, May 13, 2022 at 11:28 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Thu, May 12, 2022 at 1:01 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Use the standard obj-y form to specify the sub-directories under
> > arch/csky/. No functional change intended.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
>
> I am not sending v2 just for typo "cskly:"
>
> I hope the maintainer can fix it.
Okay.
>
>
>
>
> > arch/csky/Kbuild | 4 ++++
> > arch/csky/Makefile | 4 ----
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
> > index 4e39f7abdeb6..3015be1afd59 100644
> > --- a/arch/csky/Kbuild
> > +++ b/arch/csky/Kbuild
> > @@ -1,4 +1,8 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> >
> > +obj-y += kernel/ mm/
> > +obj-$(CONFIG_CPU_ABI_V1) += abiv1/
> > +obj-$(CONFIG_CPU_ABI_V2) += abiv2/
> > +
> > # for cleaning
> > subdir- += boot
> > diff --git a/arch/csky/Makefile b/arch/csky/Makefile
> > index 2b30525f39e1..51150abd2831 100644
> > --- a/arch/csky/Makefile
> > +++ b/arch/csky/Makefile
> > @@ -63,10 +63,6 @@ KBUILD_AFLAGS += $(KBUILD_CFLAGS)
> >
> > head-y := arch/csky/kernel/head.o
> >
> > -core-y += arch/csky/kernel/
> > -core-y += arch/csky/mm/
> > -core-y += arch/csky/$(CSKYABI)/
> > -
> > libs-y += arch/csky/lib/ \
> > $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
> >
> > --
> > 2.32.0
> >
>
>
> --
> Best Regards
> Masahiro Yamada
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2
2022-05-12 3:59 ` [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2 Masahiro Yamada
@ 2022-05-13 6:57 ` Guo Ren
2022-05-13 8:28 ` Masahiro Yamada
0 siblings, 1 reply; 11+ messages in thread
From: Guo Ren @ 2022-05-13 6:57 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-csky, Linux Kernel Mailing List
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/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2
2022-05-13 6:57 ` Guo Ren
@ 2022-05-13 8:28 ` Masahiro Yamada
2022-05-13 8:51 ` Guo Ren
0 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2022-05-13 8:28 UTC (permalink / raw)
To: Guo Ren; +Cc: linux-csky, Linux Kernel Mailing List
On Fri, May 13, 2022 at 3:57 PM Guo Ren <guoren@kernel.org> wrote:
>
> 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.
My main motivation is 4/4.
I want to use the standard Kbuild syntax in arch/csky/Kbuild.
obj-$(CONFIG_ ...) += abiv1/
obj-$(CONFIG_ ...) += 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
> >
>
>
> --
> Best Regards
> Guo Ren
>
> ML: https://lore.kernel.org/linux-csky/
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/4] csky: introduce CONFIG_CSKY_ABI_V1/2
2022-05-13 8:28 ` Masahiro Yamada
@ 2022-05-13 8:51 ` Guo Ren
0 siblings, 0 replies; 11+ messages in thread
From: Guo Ren @ 2022-05-13 8:51 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-csky, Linux Kernel Mailing List
commit 64d83f06774668081258bd7f3241267239bb9ab2 (HEAD -> linux-next,
origin/linux-next)
Author: Masahiro Yamada <masahiroy@kernel.org>
Date: Thu May 12 12:59:02 2022 +0900
csky: Move $(core-y) into arch/csky/Kbuild
Use the standard obj-y form to specify the sub-directories under
arch/csky/. Only leave core-y += arch/csky/$(CSKYABI)/ there.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Guo Ren <guoren@kernel.org>
diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
index 4e39f7abdeb6..0621eaea4196 100644
--- a/arch/csky/Kbuild
+++ b/arch/csky/Kbuild
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
+obj-y += kernel/ mm/
+
# for cleaning
subdir- += boot
diff --git a/arch/csky/Makefile b/arch/csky/Makefile
index 4d72aca4069b..4e1d619fd5c6 100644
--- a/arch/csky/Makefile
+++ b/arch/csky/Makefile
@@ -61,8 +61,6 @@ KBUILD_AFLAGS += $(KBUILD_CFLAGS)
head-y := arch/csky/kernel/head.o
-core-y += arch/csky/kernel/
-core-y += arch/csky/mm/
core-y += arch/csky/$(CSKYABI)/
libs-y += arch/csky/lib/ \
On Fri, May 13, 2022 at 4:30 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Fri, May 13, 2022 at 3:57 PM Guo Ren <guoren@kernel.org> wrote:
> >
> > 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.
>
>
> My main motivation is 4/4.
>
> I want to use the standard Kbuild syntax in arch/csky/Kbuild.
>
> obj-$(CONFIG_ ...) += abiv1/
> obj-$(CONFIG_ ...) += 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
> > >
> >
> >
> > --
> > Best Regards
> > Guo Ren
> >
> > ML: https://lore.kernel.org/linux-csky/
>
>
>
> --
> Best Regards
> Masahiro Yamada
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-05-13 8:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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.