1
2
3
4
5
6
7
8 #ifndef __ASM_PREFETCH_H
9 #define __ASM_PREFETCH_H
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 #define Pref_Load 0
35 #define Pref_Store 1
36
37 #define Pref_LoadStreamed 4
38 #define Pref_StoreStreamed 5
39 #define Pref_LoadRetained 6
40 #define Pref_StoreRetained 7
41
42 #define Pref_WriteBackInvalidate 25
43 #define Pref_PrepareForStore 30
44
45 #ifdef __ASSEMBLY__
46
47 .macro __pref hint addr
48 #ifdef CONFIG_CPU_HAS_PREFETCH
49 pref \hint, \addr
50 #endif
51 .endm
52
53 .macro pref_load addr
54 __pref Pref_Load, \addr
55 .endm
56
57 .macro pref_store addr
58 __pref Pref_Store, \addr
59 .endm
60
61 .macro pref_load_streamed addr
62 __pref Pref_LoadStreamed, \addr
63 .endm
64
65 .macro pref_store_streamed addr
66 __pref Pref_StoreStreamed, \addr
67 .endm
68
69 .macro pref_load_retained addr
70 __pref Pref_LoadRetained, \addr
71 .endm
72
73 .macro pref_store_retained addr
74 __pref Pref_StoreRetained, \addr
75 .endm
76
77 .macro pref_wback_inv addr
78 __pref Pref_WriteBackInvalidate, \addr
79 .endm
80
81 .macro pref_prepare_for_store addr
82 __pref Pref_PrepareForStore, \addr
83 .endm
84
85 #endif
86
87 #endif