Skip to content

Commit 1b41da2

Browse files
Eugeniy Paltsevnashif
authored andcommitted
ARC: Kconfig: rename CPU_ARCV2 option to ISA_ARCV2
* Rename CPU_ARCV2 to ISA_ARCV2. That helps to avoid conflict between CPU families naming and ISAs naming and aligns this options with other ARC OSS projects. * Generalize ARCV2 check to ARC check where it is required. NOTE: we add ISA_ARCV2 option in a choice list as a preparation for ISA_ARCV3 addition. Signed-off-by: Eugeniy Paltsev <[email protected]>
1 parent 8311d27 commit 1b41da2

File tree

9 files changed

+28
-20
lines changed

9 files changed

+28
-20
lines changed

arch/arc/Kconfig

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ config CPU_ARCHS
2626
This option signifies the use of an ARC HS CPU
2727

2828

29+
choice
30+
prompt "ARC Instruction Set"
31+
default ISA_ARCV2
32+
33+
config ISA_ARCV2
34+
bool "ARC ISA v2"
35+
select ARCH_HAS_STACK_PROTECTION if ARC_HAS_STACK_CHECKING || (ARC_MPU && ARC_MPU_VER !=2)
36+
select ARCH_HAS_USERSPACE if ARC_MPU
37+
select USE_SWITCH
38+
select USE_SWITCH_SUPPORTED
39+
help
40+
v2 ISA for the ARC-HS & ARC-EM cores
41+
42+
endchoice
43+
44+
if ISA_ARCV2
45+
2946
config CPU_EM4
3047
bool
3148
select CPU_ARCEM
@@ -64,20 +81,12 @@ config CPU_HS3X
6481
help
6582
If y, the SoC uses an ARC HS3x or HS4x CPU
6683

84+
endif #ISA_ARCV2
85+
6786
config FP_FPU_DA
6887
bool
6988

70-
menu "ARCv2 Family Options"
71-
72-
config CPU_ARCV2
73-
bool
74-
select ARCH_HAS_STACK_PROTECTION if ARC_HAS_STACK_CHECKING || (ARC_MPU && ARC_MPU_VER !=2)
75-
select ARCH_HAS_USERSPACE if ARC_MPU
76-
select USE_SWITCH
77-
select USE_SWITCH_SUPPORTED
78-
default y
79-
help
80-
This option signifies the use of a CPU of the ARCv2 family.
89+
menu "ARC CPU Options"
8190

8291
config NUM_IRQ_PRIO_LEVELS
8392
int "Number of supported interrupt priority levels"
@@ -101,7 +110,6 @@ config NUM_IRQS
101110

102111
config RGF_NUM_BANKS
103112
int "Number of General Purpose Register Banks"
104-
depends on CPU_ARCV2
105113
range 1 2
106114
default 2
107115
help

arch/arc/include/kernel_arch_func.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <kernel_arch_data.h>
2626

27-
#ifdef CONFIG_CPU_ARCV2
27+
#ifdef CONFIG_ISA_ARCV2
2828
#include <v2/irq.h>
2929
#endif
3030

include/arch/arc/arch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <arch/common/ffs.h>
2222
#include <arch/arc/thread.h>
2323
#include <arch/common/sys_bitops.h>
24-
#ifdef CONFIG_CPU_ARCV2
24+
#ifdef CONFIG_ISA_ARCV2
2525
#include <arch/arc/v2/exc.h>
2626
#include <arch/arc/v2/irq.h>
2727
#include <arch/arc/v2/error.h>

include/arch/arc/arch_inlines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <kernel_structs.h>
1414

15-
#ifdef CONFIG_CPU_ARCV2
15+
#ifdef CONFIG_ISA_ARCV2
1616
#include <arch/arc/v2/aux_regs.h>
1717
#endif
1818

include/arch/arc/syscall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <zephyr/types.h>
2727
#include <stdbool.h>
2828

29-
#ifdef CONFIG_CPU_ARCV2
29+
#ifdef CONFIG_ISA_ARCV2
3030
#include <arch/arc/v2/aux_regs.h>
3131
#endif
3232

tests/kernel/fpu_sharing/generic/src/float_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct fp_non_volatile_register_set {
8888
#define SIZEOF_FP_NON_VOLATILE_REGISTER_SET \
8989
sizeof(struct fp_non_volatile_register_set)
9090

91-
#elif defined(CONFIG_CPU_ARCV2)
91+
#elif defined(CONFIG_ISA_ARCV2)
9292

9393
struct fp_volatile_register_set {
9494
#ifdef CONFIG_FP_FPU_DA

tests/kernel/fpu_sharing/generic/src/float_regs_arc_gcc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef _FLOAT_REGS_ARC_GCC_H
1313
#define _FLOAT_REGS_ARC_GCC_H
1414

15-
#if !defined(__GNUC__) || !defined(CONFIG_CPU_ARCV2)
15+
#if !defined(__GNUC__) || !defined(CONFIG_ISA_ARCV2)
1616
#error __FILE__ goes only with ARC GCC
1717
#endif
1818

tests/kernel/fpu_sharing/generic/src/load_store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#else
5151
#include "float_regs_arm_other.h"
5252
#endif /* __GNUC__ */
53-
#elif defined(CONFIG_CPU_ARCV2)
53+
#elif defined(CONFIG_ISA_ARCV2)
5454
#if defined(__GNUC__)
5555
#include "float_regs_arc_gcc.h"
5656
#else

tests/kernel/fpu_sharing/generic/testcase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests:
22
kernel.fpu_sharing.generic.arc:
33
extra_args: PI_NUM_ITERATIONS=500
4-
filter: CONFIG_CPU_ARCV2 and CONFIG_CPU_HAS_FPU
4+
filter: CONFIG_ISA_ARCV2 and CONFIG_CPU_HAS_FPU
55
slow: true
66
tags: kernel
77
timeout: 600

0 commit comments

Comments
 (0)