Lines Matching full:start

30  * Cache range operations are initiated by writing the start and
33 * [start:end].
70 static inline void l2_clean_pa_range(unsigned long start, unsigned long end) in l2_clean_pa_range() argument
75 * Make sure 'start' and 'end' reference the same page, as in l2_clean_pa_range()
77 * the start address. in l2_clean_pa_range()
79 BUG_ON((start ^ end) >> PAGE_SHIFT); in l2_clean_pa_range()
81 va_start = l2_get_va(start); in l2_clean_pa_range()
82 va_end = va_start + (end - start); in l2_clean_pa_range()
101 static inline void l2_inv_pa_range(unsigned long start, unsigned long end) in l2_inv_pa_range() argument
106 * Make sure 'start' and 'end' reference the same page, as in l2_inv_pa_range()
108 * the start address. in l2_inv_pa_range()
110 BUG_ON((start ^ end) >> PAGE_SHIFT); in l2_inv_pa_range()
112 va_start = l2_get_va(start); in l2_inv_pa_range()
113 va_end = va_start + (end - start); in l2_inv_pa_range()
132 * inclusive start and end addresses.
139 static unsigned long calc_range_end(unsigned long start, unsigned long end) in calc_range_end() argument
143 BUG_ON(start & (CACHE_LINE_SIZE - 1)); in calc_range_end()
147 * Try to process all cache lines between 'start' and 'end'. in calc_range_end()
156 if (range_end > start + MAX_RANGE_SIZE) in calc_range_end()
157 range_end = start + MAX_RANGE_SIZE; in calc_range_end()
162 if (range_end > (start | (PAGE_SIZE - 1)) + 1) in calc_range_end()
163 range_end = (start | (PAGE_SIZE - 1)) + 1; in calc_range_end()
168 static void feroceon_l2_inv_range(unsigned long start, unsigned long end) in feroceon_l2_inv_range() argument
173 if (start & (CACHE_LINE_SIZE - 1)) { in feroceon_l2_inv_range()
174 l2_clean_inv_pa(start & ~(CACHE_LINE_SIZE - 1)); in feroceon_l2_inv_range()
175 start = (start | (CACHE_LINE_SIZE - 1)) + 1; in feroceon_l2_inv_range()
181 if (start < end && end & (CACHE_LINE_SIZE - 1)) { in feroceon_l2_inv_range()
187 * Invalidate all full cache lines between 'start' and 'end'. in feroceon_l2_inv_range()
189 while (start < end) { in feroceon_l2_inv_range()
190 unsigned long range_end = calc_range_end(start, end); in feroceon_l2_inv_range()
191 l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); in feroceon_l2_inv_range()
192 start = range_end; in feroceon_l2_inv_range()
198 static void feroceon_l2_clean_range(unsigned long start, unsigned long end) in feroceon_l2_clean_range() argument
205 start &= ~(CACHE_LINE_SIZE - 1); in feroceon_l2_clean_range()
207 while (start != end) { in feroceon_l2_clean_range()
208 unsigned long range_end = calc_range_end(start, end); in feroceon_l2_clean_range()
209 l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE); in feroceon_l2_clean_range()
210 start = range_end; in feroceon_l2_clean_range()
217 static void feroceon_l2_flush_range(unsigned long start, unsigned long end) in feroceon_l2_flush_range() argument
219 start &= ~(CACHE_LINE_SIZE - 1); in feroceon_l2_flush_range()
221 while (start != end) { in feroceon_l2_flush_range()
222 unsigned long range_end = calc_range_end(start, end); in feroceon_l2_flush_range()
224 l2_clean_pa_range(start, range_end - CACHE_LINE_SIZE); in feroceon_l2_flush_range()
225 l2_inv_pa_range(start, range_end - CACHE_LINE_SIZE); in feroceon_l2_flush_range()
226 start = range_end; in feroceon_l2_flush_range()