Lines Matching refs:addr
44 #define _cache_op(insn, op, addr) \
52 : "i" (op), "R" (*(unsigned char *)(addr)))
54 #define cache_op(op, addr) \
55 _cache_op(kernel_cache, op, addr)
57 static inline void flush_icache_line_indexed(unsigned long addr)
59 cache_op(Index_Invalidate_I, addr);
62 static inline void flush_dcache_line_indexed(unsigned long addr)
64 cache_op(Index_Writeback_Inv_D, addr);
67 static inline void flush_scache_line_indexed(unsigned long addr)
69 cache_op(Index_Writeback_Inv_SD, addr);
72 static inline void flush_icache_line(unsigned long addr)
76 cache_op(Hit_Invalidate_I_Loongson2, addr);
80 cache_op(Hit_Invalidate_I, addr);
85 static inline void flush_dcache_line(unsigned long addr)
87 cache_op(Hit_Writeback_Inv_D, addr);
90 static inline void invalidate_dcache_line(unsigned long addr)
92 cache_op(Hit_Invalidate_D, addr);
95 static inline void invalidate_scache_line(unsigned long addr)
97 cache_op(Hit_Invalidate_SD, addr);
100 static inline void flush_scache_line(unsigned long addr)
102 cache_op(Hit_Writeback_Inv_SD, addr);
105 #define protected_cache_op(op,addr) \
123 : "i" (op), "r" (addr), "i" (-EFAULT)); \
128 #define protected_cachee_op(op,addr) \
147 : "i" (op), "r" (addr), "i" (-EFAULT)); \
154 static inline int protected_flush_icache_line(unsigned long addr)
158 return protected_cache_op(Hit_Invalidate_I_Loongson2, addr);
162 return protected_cachee_op(Hit_Invalidate_I, addr);
164 return protected_cache_op(Hit_Invalidate_I, addr);
175 static inline int protected_writeback_dcache_line(unsigned long addr)
178 return protected_cachee_op(Hit_Writeback_Inv_D, addr);
180 return protected_cache_op(Hit_Writeback_Inv_D, addr);
184 static inline int protected_writeback_scache_line(unsigned long addr)
187 return protected_cachee_op(Hit_Writeback_Inv_SD, addr);
189 return protected_cache_op(Hit_Writeback_Inv_SD, addr);
196 static inline void invalidate_tcache_page(unsigned long addr)
198 cache_op(Page_Invalidate_T, addr);
201 #define cache_unroll(times, insn, op, addr, lsize) do { \
203 unroll(times, _cache_op, insn, op, (addr) + (i++ * (lsize))); \
215 unsigned long ws, addr; \
218 for (addr = start; addr < end; addr += lsize * 32) \
220 addr | ws, lsize); \
242 unsigned long ws, addr; \
245 for (addr = start; addr < end; addr += lsize * 32) \
247 addr | ws, lsize); \
299 unsigned long addr = start & ~(lsize - 1); \
303 prot##cache_op(hitop, addr); \
304 if (addr == aend) \
306 addr += lsize; \
322 unsigned long addr = start & ~(lsize - 1); \
327 protected_cachee_op(hitop, addr); \
328 if (addr == aend) \
330 addr += lsize; \
334 protected_cache_op(hitop, addr); \
335 if (addr == aend) \
337 addr += lsize; \
366 unsigned long ws, addr; \
369 for (addr = start; addr < end; addr += lsize * 32) \
371 addr | ws, lsize); \