Skip to content

Commit f11124f

Browse files
committed
ARCv3: Add support L2$ flush/invalidate operations
dma_cache_wback_inv(), dma_cache_inv() and dma_cache_wback() functions now invalidate/flush L1$ and L2$. Added 'cacheflush' syscall to get acces for L1$ and L2$ flush/invalidate operations from userspace.
1 parent ffc47e0 commit f11124f

File tree

3 files changed

+330
-35
lines changed

3 files changed

+330
-35
lines changed

arch/arc/include/asm/cluster.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ struct bcr_cln_scm_1_cfg {
118118
#define ARC_CLN_CACHE_STATUS 209
119119
#define ARC_CLN_CACHE_STATUS_BUSY BIT(23)
120120
#define ARC_CLN_CACHE_STATUS_DONE BIT(24)
121+
#define ARC_CLN_CACHE_STATUS_MASK BIT(26)
121122
#define ARC_CLN_CACHE_STATUS_EN BIT(27)
122123
#define ARC_CLN_CACHE_ERR 210
123124
#define ARC_CLN_CACHE_ERR_ADDR0 211

arch/arc/include/uapi/asm/cachectl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
#define CF_I_INV 0x0002
1717
#define CF_D_FLUSH 0x0010
1818
#define CF_D_FLUSH_INV 0x0020
19+
#define CF_D_INV 0x0040
20+
#define CF_D_L1 0x10000 /* Operation with L1$ */
21+
#define CF_D_L2 0x20000 /* Operation with L2$ */
22+
#define CF_D_PHY 0x40000 /* cache_flush syscall operates with phy addresses */
1923

2024
#define CF_DEFAULT (CF_I_INV | CF_D_FLUSH)
2125

0 commit comments

Comments
 (0)