Lines Matching refs:ate_resource
20 static void mark_ate(struct ate_resource *ate_resource, int start, int number,
23 u64 *ate = ate_resource->ate;
35 static int find_free_ate(struct ate_resource *ate_resource, int start,
38 u64 *ate = ate_resource->ate;
42 for (index = start; index < ate_resource->num_ate;) {
48 for (i = start_free; i < ate_resource->num_ate; i++) {
67 static inline void free_ate_resource(struct ate_resource *ate_resource,
70 mark_ate(ate_resource, start, ate_resource->ate[start], 0);
71 if ((ate_resource->lowest_free_index > start) ||
72 (ate_resource->lowest_free_index < 0))
73 ate_resource->lowest_free_index = start;
79 static inline int alloc_ate_resource(struct ate_resource *ate_resource,
87 if (ate_resource->lowest_free_index < 0)
94 find_free_ate(ate_resource, ate_resource->lowest_free_index,
97 mark_ate(ate_resource, start_index, ate_needed, ate_needed);
99 ate_resource->lowest_free_index =
100 find_free_ate(ate_resource, ate_resource->lowest_free_index, 1);