mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 15:00:42 +07:00
a5266db4d3
intel_uncore_forcewake_reset() does forcewake puts and gets as such we need to make sure that no-one tries to access the PUNIT->PMIC bus (on systems where this bus is shared) while it runs, otherwise bad things happen. Normally this is taken care of by the i915_pmic_bus_access_notifier() which does an intel_uncore_forcewake_get(FORCEWAKE_ALL) when some other driver tries to access the PMIC bus, so that later forcewake gets are no-ops (for the duration of the bus access). But intel_uncore_forcewake_reset gets called in 3 cases: 1) Before registering the pmic_bus_access_notifier 2) After unregistering the pmic_bus_access_notifier 3) To reset forcewake state on a GPU reset In all 3 cases the i915_pmic_bus_access_notifier() protection is insufficient. This commit fixes this race by calling iosf_mbi_punit_acquire() before calling intel_uncore_forcewake_reset(). In the case where it is called directly after unregistering the pmic_bus_access_notifier, we need to hold the punit-lock over both calls to avoid a race where intel_uncore_fw_release_timer() may execute between the 2 calls. Reviewed-by: Imre Deak <imre.deak@intel.com> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171019111620.26761-3-hdegoede@redhat.com |
||
---|---|---|
.. | ||
huge_gem_object.c | ||
huge_gem_object.h | ||
huge_pages.c | ||
i915_gem_coherency.c | ||
i915_gem_context.c | ||
i915_gem_dmabuf.c | ||
i915_gem_evict.c | ||
i915_gem_gtt.c | ||
i915_gem_object.c | ||
i915_gem_request.c | ||
i915_gem_timeline.c | ||
i915_live_selftests.h | ||
i915_mock_selftests.h | ||
i915_random.c | ||
i915_random.h | ||
i915_selftest.c | ||
i915_sw_fence.c | ||
i915_syncmap.c | ||
i915_vma.c | ||
intel_breadcrumbs.c | ||
intel_hangcheck.c | ||
intel_uncore.c | ||
lib_sw_fence.c | ||
lib_sw_fence.h | ||
mock_context.c | ||
mock_context.h | ||
mock_dmabuf.c | ||
mock_dmabuf.h | ||
mock_drm.c | ||
mock_drm.h | ||
mock_engine.c | ||
mock_engine.h | ||
mock_gem_device.c | ||
mock_gem_device.h | ||
mock_gem_object.h | ||
mock_gtt.c | ||
mock_gtt.h | ||
mock_request.c | ||
mock_request.h | ||
mock_timeline.c | ||
mock_timeline.h | ||
mock_uncore.c | ||
mock_uncore.h | ||
scatterlist.c |