Add error injection support to the function vm_bind_ioctl_ops_lock_and_prep. This necessitates marking the function as noinline.
Signed-off-by: Jonathan Cavitt <[email protected]> Cc: Matthew Brost <[email protected]> Cc: John Harrison <[email protected]> --- drivers/gpu/drm/xe/xe_vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 1a8841116e40..e527c90b8c33 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -3201,9 +3201,10 @@ static int vm_bind_ioctl_ops_prefetch_ranges(struct xe_vm *vm, struct xe_vma_ops return 0; } -static int vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec, - struct xe_vm *vm, - struct xe_vma_ops *vops) +static noinline int +vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec, + struct xe_vm *vm, + struct xe_vma_ops *vops) { struct xe_vma_op *op; int err; @@ -3220,6 +3221,7 @@ static int vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec, return 0; } +ALLOW_ERROR_INJECTION(vm_bind_ioctl_ops_lock_and_prep, ERRNO); static void op_trace(struct xe_vma_op *op) { -- 2.43.0
