Lines Matching defs:addr

43 #define _cache_op(insn, op, addr)					\
51 : "i" (op), "R" (*(unsigned char *)(addr)))
53 #define cache_op(op, addr) \
54 _cache_op(kernel_cache, op, addr)
56 static inline void flush_icache_line_indexed(unsigned long addr)
58 cache_op(Index_Invalidate_I, addr);
61 static inline void flush_dcache_line_indexed(unsigned long addr)
63 cache_op(Index_Writeback_Inv_D, addr);
66 static inline void flush_scache_line_indexed(unsigned long addr)
68 cache_op(Index_Writeback_Inv_SD, addr);
71 static inline void flush_icache_line(unsigned long addr)
75 cache_op(Hit_Invalidate_I_Loongson2, addr);
79 cache_op(Hit_Invalidate_I, addr);
84 static inline void flush_dcache_line(unsigned long addr)
86 cache_op(Hit_Writeback_Inv_D, addr);
89 static inline void invalidate_dcache_line(unsigned long addr)
91 cache_op(Hit_Invalidate_D, addr);
94 static inline void invalidate_scache_line(unsigned long addr)
96 cache_op(Hit_Invalidate_SD, addr);
99 static inline void flush_scache_line(unsigned long addr)
101 cache_op(Hit_Writeback_Inv_SD, addr);
106 #define protected_cache_op(op, addr) \
125 : "i" (op), "r" (addr), "i" (-EFAULT)); \
130 #define protected_cache_op(op, addr) \
148 : "i" (op), "r" (addr), "i" (-EFAULT)); \
156 static inline int protected_flush_icache_line(unsigned long addr)
160 return protected_cache_op(Hit_Invalidate_I_Loongson2, addr);
163 return protected_cache_op(Hit_Invalidate_I, addr);
173 static inline int protected_writeback_dcache_line(unsigned long addr)
175 return protected_cache_op(Hit_Writeback_Inv_D, addr);
178 static inline int protected_writeback_scache_line(unsigned long addr)
180 return protected_cache_op(Hit_Writeback_Inv_SD, addr);
186 static inline void invalidate_tcache_page(unsigned long addr)
188 cache_op(Page_Invalidate_T, addr);
191 #define cache_unroll(times, insn, op, addr, lsize) do { \
193 unroll(times, _cache_op, insn, op, (addr) + (i++ * (lsize))); \
205 unsigned long ws, addr; \
208 for (addr = start; addr < end; addr += lsize * 32) \
210 addr | ws, lsize); \
232 unsigned long ws, addr; \
235 for (addr = start; addr < end; addr += lsize * 32) \
237 addr | ws, lsize); \
289 unsigned long addr = start & ~(lsize - 1); \
293 prot##cache_op(hitop, addr); \
294 if (addr == aend) \
296 addr += lsize; \
321 unsigned long ws, addr; \
324 for (addr = start; addr < end; addr += lsize * 32) \
326 addr | ws, lsize); \