From: jsg Date: Sun, 30 Jan 2022 23:19:26 +0000 (+0000) Subject: unstub intel_gt_get_awake_time() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7fbee575b130778ef6213543b2541c15662c3cc6;p=openbsd unstub intel_gt_get_awake_time() --- diff --git a/sys/dev/pci/drm/i915/gt/intel_gt_pm.c b/sys/dev/pci/drm/i915/gt/intel_gt_pm.c index 43237fe4113..2df0c5f1bf8 100644 --- a/sys/dev/pci/drm/i915/gt/intel_gt_pm.c +++ b/sys/dev/pci/drm/i915/gt/intel_gt_pm.c @@ -393,19 +393,22 @@ static ktime_t __intel_gt_get_awake_time(const struct intel_gt *gt) ktime_t intel_gt_get_awake_time(const struct intel_gt *gt) { - STUB(); - return 0; -#ifdef notyet unsigned int seq; ktime_t total; +#ifdef notyet do { seq = read_seqcount_begin(>->stats.lock); total = __intel_gt_get_awake_time(gt); } while (read_seqcount_retry(>->stats.lock, seq)); +#else + do { + seq = read_seqcount_begin((seqcount_t *)>->stats.lock); + total = __intel_gt_get_awake_time(gt); + } while (read_seqcount_retry((seqcount_t *)>->stats.lock, seq)); +#endif return total; -#endif } #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)