@@ -315,40 +315,29 @@ void xe_vm_snapshot_free(struct xe_vm_snapshot *snap);
315315 * Register this task as currently making bos resident for the vm. Intended
316316 * to avoid eviction by the same task of shared bos bound to the vm.
317317 * Call with the vm's resv lock held.
318- *
319- * Return: A pin cookie that should be used for xe_vm_clear_validating().
320318 */
321- static inline struct pin_cookie xe_vm_set_validating (struct xe_vm * vm ,
322- bool allow_res_evict )
319+ static inline void xe_vm_set_validating (struct xe_vm * vm , bool allow_res_evict )
323320{
324- struct pin_cookie cookie = {};
325-
326321 if (vm && !allow_res_evict ) {
327322 xe_vm_assert_held (vm );
328- cookie = lockdep_pin_lock (& xe_vm_resv (vm )-> lock .base );
329323 /* Pairs with READ_ONCE in xe_vm_is_validating() */
330324 WRITE_ONCE (vm -> validating , current );
331325 }
332-
333- return cookie ;
334326}
335327
336328/**
337329 * xe_vm_clear_validating() - Unregister this task as currently making bos resident
338330 * @vm: Pointer to the vm or NULL
339331 * @allow_res_evict: Eviction from @vm was allowed. Must be set to the same
340332 * value as for xe_vm_set_validation().
341- * @cookie: Cookie obtained from xe_vm_set_validating().
342333 *
343334 * Register this task as currently making bos resident for the vm. Intended
344335 * to avoid eviction by the same task of shared bos bound to the vm.
345336 * Call with the vm's resv lock held.
346337 */
347- static inline void xe_vm_clear_validating (struct xe_vm * vm , bool allow_res_evict ,
348- struct pin_cookie cookie )
338+ static inline void xe_vm_clear_validating (struct xe_vm * vm , bool allow_res_evict )
349339{
350340 if (vm && !allow_res_evict ) {
351- lockdep_unpin_lock (& xe_vm_resv (vm )-> lock .base , cookie );
352341 /* Pairs with READ_ONCE in xe_vm_is_validating() */
353342 WRITE_ONCE (vm -> validating , NULL );
354343 }
0 commit comments