@@ -310,40 +310,29 @@ void xe_vm_snapshot_free(struct xe_vm_snapshot *snap);
310310 * Register this task as currently making bos resident for the vm. Intended
311311 * to avoid eviction by the same task of shared bos bound to the vm.
312312 * Call with the vm's resv lock held.
313- *
314- * Return: A pin cookie that should be used for xe_vm_clear_validating().
315313 */
316- static inline struct pin_cookie xe_vm_set_validating (struct xe_vm * vm ,
317- bool allow_res_evict )
314+ static inline void xe_vm_set_validating (struct xe_vm * vm , bool allow_res_evict )
318315{
319- struct pin_cookie cookie = {};
320-
321316 if (vm && !allow_res_evict ) {
322317 xe_vm_assert_held (vm );
323- cookie = lockdep_pin_lock (& xe_vm_resv (vm )-> lock .base );
324318 /* Pairs with READ_ONCE in xe_vm_is_validating() */
325319 WRITE_ONCE (vm -> validating , current );
326320 }
327-
328- return cookie ;
329321}
330322
331323/**
332324 * xe_vm_clear_validating() - Unregister this task as currently making bos resident
333325 * @vm: Pointer to the vm or NULL
334326 * @allow_res_evict: Eviction from @vm was allowed. Must be set to the same
335327 * value as for xe_vm_set_validation().
336- * @cookie: Cookie obtained from xe_vm_set_validating().
337328 *
338329 * Register this task as currently making bos resident for the vm. Intended
339330 * to avoid eviction by the same task of shared bos bound to the vm.
340331 * Call with the vm's resv lock held.
341332 */
342- static inline void xe_vm_clear_validating (struct xe_vm * vm , bool allow_res_evict ,
343- struct pin_cookie cookie )
333+ static inline void xe_vm_clear_validating (struct xe_vm * vm , bool allow_res_evict )
344334{
345335 if (vm && !allow_res_evict ) {
346- lockdep_unpin_lock (& xe_vm_resv (vm )-> lock .base , cookie );
347336 /* Pairs with READ_ONCE in xe_vm_is_validating() */
348337 WRITE_ONCE (vm -> validating , NULL );
349338 }
0 commit comments