mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: unit: propagate fault injection to threads
Change approach to how the fault injection state is stored to facilitate propagating fault injection state to child-threads. Rather than each unit maintaining a thread-local object, there is a thread-local container stored in the posix-fault-injection itself. This container is initialized for each test module so that is independent of other other test modules (for parallel test module execution). When child threads are created with nvgpu_create_thread(), the fault injection container is configured for the child. JIRA NVGPU-3981 Change-Id: I9b580dc7f1621a7770eef8eba796f3918f2738bf Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2238474 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
0f5dd4e9b6
commit
95c3e56961
@@ -28,6 +28,7 @@ struct unit_modules;
|
||||
struct unit_results;
|
||||
|
||||
struct gk20a;
|
||||
struct nvgpu_posix_fault_inj_container;
|
||||
|
||||
/*
|
||||
* The core unit testing framework data structure. Keeps track of global state
|
||||
@@ -54,7 +55,12 @@ struct unit_fw {
|
||||
struct {
|
||||
struct gk20a *(*nvgpu_posix_probe)(void);
|
||||
void (*nvgpu_posix_cleanup)(struct gk20a *g);
|
||||
void (*nvgpu_posix_init_fault_injection)
|
||||
(struct nvgpu_posix_fault_inj_container *c);
|
||||
void (*nvgpu_posix_init_fault_injection_qnx)
|
||||
(struct nvgpu_posix_fault_inj_container *c);
|
||||
} nvgpu;
|
||||
void *nvgpu_qnx_ut;
|
||||
};
|
||||
|
||||
int core_load_nvgpu(struct unit_fw *fw);
|
||||
|
||||
Reference in New Issue
Block a user