Files
nvdriver/tests/oracles/thread-timeout-shim.h
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

32 lines
1.3 KiB
C

/* Test services and storage only; policy functions are extracted unchanged. */
#include "timeout-shim.h"
#define NV_MAX(a,b) ((a)>(b)?(a):(b))
#define THREAD_STATE_FLAGS_IS_ISR 1
#define THREAD_STATE_FLAGS_DEFERRED_INT_HANDLER_RUNNING 6
#define THREAD_STATE_FLAGS_IS_ISR_LOCKLESS 8
#define THREAD_STATE_FLAGS_DEVICE_INIT 128
#define THREAD_STATE_FLAGS_TIMEOUT_INITED 32
#define TIMEOUT_DPC_ISR_INTERVAL_MS 500
#define TIMEOUT_DEFAULT_OS_RESCHEDULE_INTERVAL_SECS 2
#define THREAD_STATE_SETUP_FLAGS_TIMEOUT_ENABLED 2
#define THREAD_STATE_SETUP_FLAGS_ASSERT_ON_TIMEOUT_ENABLED 16
#define THREAD_STATE_SETUP_FLAGS_RESET_ON_TIMEOUT_ENABLED 64
typedef struct {
struct {
NvU64 enterTime,nonComputeTime,computeTime,nextCpuYieldTime,overrideTimeoutMsecs;
} timeout;
NvU32 flags;
} THREAD_STATE_NODE;
static struct {
NvU32 setupFlags;
struct {NvU32 flags,computeGpuMask;NvU64 computeTimeoutMsecs,nonComputeTimeoutMsecs;} timeout;
} threadStateDatabase;
static THREAD_STATE_NODE *current_node;
static void _threadStatePrintInfo(THREAD_STATE_NODE *n){(void)n;}
static NV_STATUS threadStateGetCurrent(THREAD_STATE_NODE **out,OBJGPU *g){
(void)g;
if(!(threadStateDatabase.setupFlags&1)){*out=NULL;return 0x40;}
*out=current_node;return current_node?0:0x57;
}
NV_STATUS threadStateResetTimeout(OBJGPU *gpu);