From 0d19c7a546325a720de0a4fc9299346454d03f73 Mon Sep 17 00:00:00 2001 From: Rajesh Devaraj Date: Mon, 2 Dec 2019 13:56:41 +0530 Subject: [PATCH] gpu: nvgpu: update fault injection This patch updates fault injection for nvgpu_thread_create_priority(). JIRA NVGPU-2694 Change-Id: I254649cfd6b7a76afe89b227991fbe9e03c422ea Signed-off-by: Rajesh Devaraj Reviewed-on: https://git-master.nvidia.com/r/2252737 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Nicolas Benech Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/posix/thread.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/nvgpu/os/posix/thread.c b/drivers/gpu/nvgpu/os/posix/thread.c index e3478617a..74d5f7a5d 100644 --- a/drivers/gpu/nvgpu/os/posix/thread.c +++ b/drivers/gpu/nvgpu/os/posix/thread.c @@ -140,6 +140,13 @@ int nvgpu_thread_create_priority(struct nvgpu_thread *thread, struct sched_param param; int ret; +#ifdef NVGPU_UNITTEST_FAULT_INJECTION_ENABLEMENT + if (nvgpu_posix_fault_injection_handle_call( + nvgpu_thread_get_fault_injection())) { + return -EINVAL; + } +#endif + (void) memset(thread, 0, sizeof(*thread)); (void) memset(¶m, 0, sizeof(struct sched_param));