From: bluhm Date: Thu, 12 Jan 2023 00:27:26 +0000 (+0000) Subject: Compiling kernel with witness option failed since drm update. Do X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6155d736d02e256af5e04eb415f02a8c61bdb534;p=openbsd Compiling kernel with witness option failed since drm update. Do not define struct rwlock variable within function, witness needs global access. OK jsg@ --- 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;