Skip to content

Commit 14b7f71

Browse files
committed
ARCv2: Add SLC-related AUX regs
1. ARC_REG_SLC_CFG_BCR is not a BCR (Build configuration register) but a simple AUX reg for SLC control. Any BCR AUX reg could be read always and that's safe while attempt to even read AUX reg that corresponds to missing HW block will inevitably lead to "Instruciton Error" exception. So to prevent users from misuse of that AUX register we'll remove "_BCR" suffix from its name 2. To manage SLC we'll need more AUX regs for: * SLC enable/disable (ARC_REG_SLC_CONTROL) * full flush (ARC_REG_SLC_FLUSH) * full invaludation (ARC_REG_SLC_INVALIDATE) Signed-off-by: Alexey Brodkin <[email protected]>
1 parent 89c31c8 commit 14b7f71

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

arch/arc/include/asm/arcregs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#define ARC_REG_ISA_CFG_BCR 0xc1
3737
#define ARC_REG_RTT_BCR 0xF2
3838
#define ARC_REG_SMART_BCR 0xFF
39-
#define ARC_REG_SLC_CFG_BCR 0x901
4039

4140
/* status32 Bits Positions */
4241
#define STATUS_AE_BIT 5 /* Exception active */

arch/arc/include/asm/cache.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,13 @@ extern void read_decode_cache_bcr(void);
8282
#define DC_CTRL_INV_MODE_FLUSH 0x40
8383
#define DC_CTRL_FLUSH_STATUS 0x100
8484

85+
/*System-level cache (SLC) related Auxiliary registers */
86+
#define ARC_REG_SLC_CFG 0x901
87+
#define ARC_REG_SLC_CONTROL 0x903
88+
#define ARC_REG_SLC_FLUSH 0x904
89+
#define ARC_REG_SLC_INVALIDATE 0x905
90+
91+
/* Bit val in SLC_CONTROL */
92+
#define SLC_CONTROL_DISABLE 0x1
93+
8594
#endif /* _ASM_CACHE_H */

arch/arc/mm/cache_arc700.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void read_decode_cache_bcr(void)
172172
p_slc = &cpuinfo_arc700[cpu].slc;
173173
READ_BCR(ARC_REG_SLC_BCR, sbcr);
174174
if (sbcr.ver) {
175-
READ_BCR(ARC_REG_SLC_CFG_BCR, slc_cfg);
175+
READ_BCR(ARC_REG_SLC_CFG, slc_cfg);
176176
p_slc->ver = sbcr.ver;
177177
p_slc->sz_k = 128 << slc_cfg.sz;
178178
p_slc->line_len = (slc_cfg.lsz == 0) ? 128 : 64;

0 commit comments

Comments
 (0)