Skip to content

Commit 7e6cbb0

Browse files
Vladimir IsaevVVIsaev
authored andcommitted
ARC: Add option to control SCM
Shared Cache Memory (SCM) is L2 cache used in ARCv3. Sometimes we don't want to have it enabled (to test performance change), so need to have an option to control it. Please note that this option works only for ARCv3 SCM, because in ARCv2 L2 cache is enabled by default and cannot be disabled in such easy way. Signed-off-by: Vladimir Isaev <isaev@synopsys.com>
1 parent 141751e commit 7e6cbb0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

arch/arc/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ config ARC_CACHE_PAGES
259259
Note that Global I/D ENABLE + Per Page DISABLE works but corollary
260260
Global DISABLE + Per Page ENABLE won't work
261261

262+
config ARC_HAS_SCM
263+
bool "Use Shared Cache Memory"
264+
depends on ISA_ARCV3
265+
default y
266+
262267
config ARC_CACHE_VIPT_ALIASING
263268
bool "Support VIPT Aliasing D$"
264269
depends on ARC_HAS_DCACHE && ISA_ARCOMPACT

arch/arc/mm/cache-arcv3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <asm/cacheflush.h>
99
#include <asm/setup.h>
1010

11-
int l2_enable = 1;
11+
int l2_enable = IS_ENABLED(CONFIG_ARC_HAS_SCM);
1212

1313
static struct cpuinfo_arc_cache {
1414
unsigned int sz_k, line_len, colors;

0 commit comments

Comments
 (0)