]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915/pmu: Initialise the spinlock before registering
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Oct 2019 16:54:42 +0000 (17:54 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 25 Oct 2019 21:56:14 +0000 (22:56 +0100)
commitc442292a661bec3a32cf2a351c53c5f07da20e21
tree8657108c4895abbe3b78c334470e362726751fbd
parent0e99f939f08fc36820869e87dee109c5996abff0
drm/i915/pmu: Initialise the spinlock before registering

As the GT may be running in parallel with the module initialisation
code, we may enter i915_pmu_gt_parked() as we are executing
i915_pmu_register(). We have to init the spinlock before we mark
pmu.event_init so that it is available for use by i915_pmu_gt_parked()
(which may run as soon as event_init is set).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112127
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191025165442.23356-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_pmu.c