2018-11-30 12:53:00

by Alexey Brodkin

[permalink] [raw]
Subject: [PATCH v2] ARC: change defconfig defaults to ARCv2

From: Kevin Hilman <[email protected]>

Change the default defconfig (used with 'make defconfig') to the ARCv2
nsim_hs_defconfig, and also switch the default Kconfig ISA selection to
ARCv2.

This allows several default defconfigs (e.g. make defconfig, make
allnoconfig, make tinyconfig) to all work with ARCv2 by default.

Note since we change default architecture from ARCompact to ARCv2
it's required to explicitly mention architecture type in ARCompact
defconfigs otherwise ARCv2 will be implied and binaries will be
generated for ARCv2.

Signed-off-by: Kevin Hilman <[email protected]>
Signed-off-by: Alexey Brodkin <[email protected]>
Cc: <[email protected]> # 4.4.x
---

Changes v1 -> v2:
* Added CONFIG_ISA_ARCOMPACT to ARCompact defconfigs

arch/arc/Kconfig | 2 +-
arch/arc/Makefile | 2 +-
arch/arc/configs/axs101_defconfig | 1 +
arch/arc/configs/nps_defconfig | 1 +
arch/arc/configs/nsim_700_defconfig | 1 +
arch/arc/configs/nsimosci_defconfig | 1 +
arch/arc/configs/tb10x_defconfig | 1 +
7 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 5fcbda6b37cc..6dd783557330 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -109,7 +109,7 @@ endmenu

choice
prompt "ARC Instruction Set"
- default ISA_ARCOMPACT
+ default ISA_ARCV2

config ISA_ARCOMPACT
bool "ARCompact ISA"
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index c64c505d966c..df00578c279d 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -6,7 +6,7 @@
# published by the Free Software Foundation.
#

-KBUILD_DEFCONFIG := nsim_700_defconfig
+KBUILD_DEFCONFIG := nsim_hs_defconfig

cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
diff --git a/arch/arc/configs/axs101_defconfig b/arch/arc/configs/axs101_defconfig
index 8c23bd086cd0..020d4493edfd 100644
--- a/arch/arc/configs/axs101_defconfig
+++ b/arch/arc/configs/axs101_defconfig
@@ -14,6 +14,7 @@ CONFIG_PERF_EVENTS=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_SLUB_DEBUG is not set
# CONFIG_COMPAT_BRK is not set
+CONFIG_ISA_ARCOMPACT=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
diff --git a/arch/arc/configs/nps_defconfig b/arch/arc/configs/nps_defconfig
index ae7a0d8be98d..6e84060e7c90 100644
--- a/arch/arc/configs/nps_defconfig
+++ b/arch/arc/configs/nps_defconfig
@@ -15,6 +15,7 @@ CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not set
+CONFIG_ISA_ARCOMPACT=y
CONFIG_KPROBES=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig
index 8e0b8b134cd9..219c2a65294b 100644
--- a/arch/arc/configs/nsim_700_defconfig
+++ b/arch/arc/configs/nsim_700_defconfig
@@ -15,6 +15,7 @@ CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
# CONFIG_SLUB_DEBUG is not set
# CONFIG_COMPAT_BRK is not set
+CONFIG_ISA_ARCOMPACT=y
CONFIG_KPROBES=y
CONFIG_MODULES=y
# CONFIG_LBDAF is not set
diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig
index ad77f20e5aa6..35dfc6491a09 100644
--- a/arch/arc/configs/nsimosci_defconfig
+++ b/arch/arc/configs/nsimosci_defconfig
@@ -15,6 +15,7 @@ CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
# CONFIG_SLUB_DEBUG is not set
# CONFIG_COMPAT_BRK is not set
+CONFIG_ISA_ARCOMPACT=y
CONFIG_KPROBES=y
CONFIG_MODULES=y
# CONFIG_LBDAF is not set
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
index a7f65313f84a..e71ade3cf9c8 100644
--- a/arch/arc/configs/tb10x_defconfig
+++ b/arch/arc/configs/tb10x_defconfig
@@ -19,6 +19,7 @@ CONFIG_KALLSYMS_ALL=y
# CONFIG_AIO is not set
CONFIG_EMBEDDED=y
# CONFIG_COMPAT_BRK is not set
+CONFIG_ISA_ARCOMPACT=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
--
2.16.2



2018-11-30 18:56:38

by Vineet Gupta

[permalink] [raw]
Subject: Re: [PATCH v2] ARC: change defconfig defaults to ARCv2

On 11/30/18 4:52 AM, Alexey Brodkin wrote:
> From: Kevin Hilman <[email protected]>
>
> Change the default defconfig (used with 'make defconfig') to the ARCv2
> nsim_hs_defconfig, and also switch the default Kconfig ISA selection to
> ARCv2.
>
> This allows several default defconfigs (e.g. make defconfig, make
> allnoconfig, make tinyconfig) to all work with ARCv2 by default.
>
> Note since we change default architecture from ARCompact to ARCv2
> it's required to explicitly mention architecture type in ARCompact
> defconfigs otherwise ARCv2 will be implied and binaries will be
> generated for ARCv2.
>
> Signed-off-by: Kevin Hilman <[email protected]>
> Signed-off-by: Alexey Brodkin <[email protected]>
> Cc: <[email protected]> # 4.4.x

Applied.

Thx,
-Vineet

2018-11-30 21:32:21

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2] ARC: change defconfig defaults to ARCv2

Alexey Brodkin <[email protected]> writes:

> From: Kevin Hilman <[email protected]>
>
> Change the default defconfig (used with 'make defconfig') to the ARCv2
> nsim_hs_defconfig, and also switch the default Kconfig ISA selection to
> ARCv2.
>
> This allows several default defconfigs (e.g. make defconfig, make
> allnoconfig, make tinyconfig) to all work with ARCv2 by default.
>
> Note since we change default architecture from ARCompact to ARCv2
> it's required to explicitly mention architecture type in ARCompact
> defconfigs otherwise ARCv2 will be implied and binaries will be
> generated for ARCv2.
>
> Signed-off-by: Kevin Hilman <[email protected]>
> Signed-off-by: Alexey Brodkin <[email protected]>
> Cc: <[email protected]> # 4.4.x

Tested-by: Kevin Hilman <[email protected]>

Nice, thanks for cleaning this up. I tested it again for the kernelCI
use cases, and it's still working.

Thanks,

Kevin

2018-12-03 10:25:28

by Alexey Brodkin

[permalink] [raw]
Subject: Re: [PATCH v2] ARC: change defconfig defaults to ARCv2

Hi Sasha,

On Sun, 2018-12-02 at 06:49 +0000, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: 4.4.+
>
> The bot has tested the following trees: v4.19.5, v4.14.84, v4.9.141, v4.4.165,
>
> v4.19.5: Build OK!
> v4.14.84: Build OK!
> v4.9.141: Failed to apply! Possible dependencies:
> Unable to calculate

That's a fixed hunk for 4.9:
---------------------->8----------------------
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -8,7 +8,7 @@

UTS_MACHINE := arc

-KBUILD_DEFCONFIG := nsim_700_defconfig
+KBUILD_DEFCONFIG := nsim_hs_defconfig

cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
---------------------->8----------------------

> v4.4.165: Failed to apply! Possible dependencies:
> 845033be0041 ("ARC: [plat-eznps] Add eznps board defconfig and dts")

Indeed EzChip's nps400 platform was added later but we don't need it in 4.4.y
as IIRC there were quite some other dependencies, so just drop hunk related to it.

And once nps_defconfig hunk is dropped there's a fixd hunk for arch/arc/Makefile
similarly to 4.9:
---------------------->8----------------------
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -12,7 +12,7 @@ ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := arc-linux-
endif

-KBUILD_DEFCONFIG := nsim_700_defconfig
+KBUILD_DEFCONFIG := nsim_hs_defconfig

cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
---------------------->8----------------------

> How should we proceed with this patch?

Hope above helps. Otherwise I may send complete patches for both
4.4 and 4.9.

Let me know what is your preference.

-Alexey