From 6155d736d02e256af5e04eb415f02a8c61bdb534 Mon Sep 17 00:00:00 2001 From: bluhm Date: Thu, 12 Jan 2023 00:27:26 +0000 Subject: [PATCH] Compiling kernel with witness option failed since drm update. Do not define struct rwlock variable within function, witness needs global access. OK jsg@ --- sys/dev/pci/drm/i915/i915_gpu_error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/i915/i915_gpu_error.c b/sys/dev/pci/drm/i915/i915_gpu_error.c index 714fcf76fcd..c2926afa051 100644 --- a/sys/dev/pci/drm/i915/i915_gpu_error.c +++ b/sys/dev/pci/drm/i915/i915_gpu_error.c @@ -2150,10 +2150,11 @@ __i915_gpu_coredump(struct intel_gt *gt, intel_engine_mask_t engine_mask, u32 du return error; } +static DEFINE_MUTEX(capture_mutex); + struct i915_gpu_coredump * i915_gpu_coredump(struct intel_gt *gt, intel_engine_mask_t engine_mask, u32 dump_flags) { - static DEFINE_MUTEX(capture_mutex); int ret = mutex_lock_interruptible(&capture_mutex); struct i915_gpu_coredump *dump; -- 2.20.1