File tree Expand file tree Collapse file tree 5 files changed +33
-59
lines changed Expand file tree Collapse file tree 5 files changed +33
-59
lines changed Original file line number Diff line number Diff line change 16
16
#ifndef __ASM_CACHE_H
17
17
#define __ASM_CACHE_H
18
18
19
- #include <asm/cachetype.h>
19
+ #include <asm/cputype.h>
20
+
21
+ #define CTR_L1IP_SHIFT 14
22
+ #define CTR_L1IP_MASK 3
23
+ #define CTR_CWG_SHIFT 24
24
+ #define CTR_CWG_MASK 15
25
+
26
+ #define CTR_L1IP (ctr ) (((ctr) >> CTR_L1IP_SHIFT) & CTR_L1IP_MASK)
27
+
28
+ #define ICACHE_POLICY_VIPT 2
29
+ #define ICACHE_POLICY_PIPT 3
20
30
21
31
#define L1_CACHE_SHIFT 7
22
32
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
32
42
33
43
#ifndef __ASSEMBLY__
34
44
45
+ #include <linux/bitops.h>
46
+
47
+ #define ICACHEF_ALIASING 0
48
+ extern unsigned long __icache_flags ;
49
+
50
+ /*
51
+ * Whilst the D-side always behaves as PIPT on AArch64, aliasing is
52
+ * permitted in the I-cache.
53
+ */
54
+ static inline int icache_is_aliasing (void )
55
+ {
56
+ return test_bit (ICACHEF_ALIASING , & __icache_flags );
57
+ }
58
+
59
+ static inline u32 cache_type_cwg (void )
60
+ {
61
+ return (read_cpuid_cachetype () >> CTR_CWG_SHIFT ) & CTR_CWG_MASK ;
62
+ }
63
+
35
64
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
36
65
37
66
static inline int cache_line_size (void )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ alternative_else_nop_endif
108
108
#else
109
109
110
110
#include <asm/pgalloc.h>
111
- #include <asm/cachetype .h>
111
+ #include <asm/cache .h>
112
112
#include <asm/cacheflush.h>
113
113
#include <asm/mmu_context.h>
114
114
#include <asm/pgtable.h>
Original file line number Diff line number Diff line change 15
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
*/
17
17
#include <asm/arch_timer.h>
18
- #include <asm/cachetype .h>
18
+ #include <asm/cache .h>
19
19
#include <asm/cpu.h>
20
20
#include <asm/cputype.h>
21
21
#include <asm/cpufeature.h>
Original file line number Diff line number Diff line change 22
22
#include <linux/pagemap.h>
23
23
24
24
#include <asm/cacheflush.h>
25
- #include <asm/cachetype .h>
25
+ #include <asm/cache .h>
26
26
#include <asm/tlbflush.h>
27
27
28
28
void sync_icache_aliases (void * kaddr , unsigned long len )
You can’t perform that action at this time.
0 commit comments