31 #include <linux/wait.h>
32 #include <linux/sched.h>
33 #include <linux/module.h>
35 static void ttm_eu_backoff_reservation_locked(
struct list_head *
list)
55 static void ttm_eu_del_from_lru_locked(
struct list_head *list)
71 static void ttm_eu_list_ref_sub(
struct list_head *list)
85 static int ttm_eu_wait_unreserved_locked(
struct list_head *list,
91 ttm_eu_del_from_lru_locked(list);
96 ttm_eu_backoff_reservation_locked(list);
106 if (list_empty(list))
110 glob = entry->
bo->glob;
112 ttm_eu_backoff_reservation_locked(list);
136 if (list_empty(list))
146 glob = entry->
bo->glob;
150 val_seq = entry->
bo->bdev->val_seq++;
161 ret = ttm_eu_wait_unreserved_locked(list, bo);
164 ttm_eu_list_ref_sub(list);
169 ttm_eu_backoff_reservation_locked(list);
171 ttm_eu_list_ref_sub(list);
177 ttm_eu_backoff_reservation_locked(list);
179 ttm_eu_list_ref_sub(list);
185 ttm_eu_backoff_reservation_locked(list);
187 ttm_eu_list_ref_sub(list);
195 ttm_eu_del_from_lru_locked(list);
197 ttm_eu_list_ref_sub(list);
211 if (list_empty(list))