Skip to content

Commit 06019be

Browse files
Akira Takeuchidhowells
authored andcommitted
MN10300: Don't hard code the cacheline size in register defs
Don't hard code the cacheline size in the cache control register definitions. Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com> Signed-off-by: Kiyoshi Owada <owada.kiyoshi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com>
1 parent a116956 commit 06019be

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎arch/mn10300/include/asm/cache.h‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@
4343

4444
/* instruction cache access registers */
4545
#define ICACHE_DATA(WAY, ENTRY, OFF) \
46-
__SYSREG(0xc8000000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
46+
__SYSREG(0xc8000000 + (WAY) * L1_CACHE_WAYDISP + \
47+
(ENTRY) * L1_CACHE_BYTES + (OFF) * 4, u32)
4748
#define ICACHE_TAG(WAY, ENTRY) \
48-
__SYSREG(0xc8100000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
49+
__SYSREG(0xc8100000 + (WAY) * L1_CACHE_WAYDISP + \
50+
(ENTRY) * L1_CACHE_BYTES, u32)
4951

50-
/* instruction cache access registers */
52+
/* data cache access registers */
5153
#define DCACHE_DATA(WAY, ENTRY, OFF) \
52-
__SYSREG(0xc8200000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10 + (OFF) * 4, u32)
54+
__SYSREG(0xc8200000 + (WAY) * L1_CACHE_WAYDISP + \
55+
(ENTRY) * L1_CACHE_BYTES + (OFF) * 4, u32)
5356
#define DCACHE_TAG(WAY, ENTRY) \
54-
__SYSREG(0xc8300000 + (WAY) * L1_CACHE_WAYDISP + (ENTRY) * 0x10, u32)
57+
__SYSREG(0xc8300000 + (WAY) * L1_CACHE_WAYDISP + \
58+
(ENTRY) * L1_CACHE_BYTES, u32)
5559

5660
#endif /* _ASM_CACHE_H */

0 commit comments

Comments
 (0)