diff options
Diffstat (limited to 'mali_kbase/backend/gpu/mali_kbase_model_error_generator.c')
-rw-r--r-- | mali_kbase/backend/gpu/mali_kbase_model_error_generator.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/mali_kbase/backend/gpu/mali_kbase_model_error_generator.c b/mali_kbase/backend/gpu/mali_kbase_model_error_generator.c index c91c0d8..f310cc7 100644 --- a/mali_kbase/backend/gpu/mali_kbase_model_error_generator.c +++ b/mali_kbase/backend/gpu/mali_kbase_model_error_generator.c @@ -21,30 +21,29 @@ #include <mali_kbase.h> #include <linux/random.h> -#include "backend/gpu/mali_kbase_model_dummy.h" +#include "backend/gpu/mali_kbase_model_linux.h" -/* all the error conditions supported by the model */ -#define TOTAL_FAULTS 27 -/* maximum number of levels in the MMU translation table tree */ -#define MAX_MMU_TABLE_LEVEL 4 -/* worst case scenario is <1 MMU fault + 1 job fault + 2 GPU faults> */ -#define MAX_CONCURRENT_FAULTS 3 +static struct kbase_error_atom *error_track_list; + +#ifdef CONFIG_MALI_ERROR_INJECT_RANDOM /** Kernel 6.1.0 has dropped prandom_u32(), use get_random_u32() */ #if (KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE) #define prandom_u32 get_random_u32 #endif -static struct kbase_error_atom *error_track_list; - -unsigned int rand_seed; - /*following error probability are set quite high in order to stress the driver*/ -unsigned int error_probability = 50; /* to be set between 0 and 100 */ +static unsigned int error_probability = 50; /* to be set between 0 and 100 */ /* probability to have multiple error give that there is an error */ -unsigned int multiple_error_probability = 50; +static unsigned int multiple_error_probability = 50; + +/* all the error conditions supported by the model */ +#define TOTAL_FAULTS 27 +/* maximum number of levels in the MMU translation table tree */ +#define MAX_MMU_TABLE_LEVEL 4 +/* worst case scenario is <1 MMU fault + 1 job fault + 2 GPU faults> */ +#define MAX_CONCURRENT_FAULTS 3 -#ifdef CONFIG_MALI_ERROR_INJECT_RANDOM /** * gpu_generate_error - Generate GPU error */ |