2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/gpu/drm/i915/gt/uc
Krzysztof Karas e49477f7f7
drm/i915/gt: Use spin_lock_irqsave() in interruptible context
spin_lock/unlock() functions used in interrupt contexts could
result in a deadlock, as seen in GitLab issue #13399,
which occurs when interrupt comes in while holding a lock.

Try to remedy the problem by saving irq state before spin lock
acquisition.

v2: add irqs' state save/restore calls to all locks/unlocks in
 signal_irq_work() execution (Maciej)

v3: use with spin_lock_irqsave() in guc_lrc_desc_unpin() instead
 of other lock/unlock calls and add Fixes and Cc tags (Tvrtko);
 change title and commit message

Fixes: 2f2cc53b5f ("drm/i915/guc: Close deregister-context race against CT-loss")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13399
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Cc: <stable@vger.kernel.org> # v6.9+
Reviewed-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/pusppq5ybyszau2oocboj3mtj5x574gwij323jlclm5zxvimmu@mnfg6odxbpsv
(cherry picked from commit c088387ddd)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2025-02-17 09:22:29 -05:00
..
abi drm/i915/guc: Extend w/a 14019159160 2024-07-18 12:51:56 -07:00
guc_capture_fwif.h
intel_gsc_binary_headers.h
intel_gsc_fw.c drm/i915/gsc: ARL-H and ARL-U need a newer GSC FW. 2024-11-12 09:44:55 +02:00
intel_gsc_fw.h
intel_gsc_proxy.c drm: move i915_component.h under include/drm/intel 2024-05-31 16:11:00 +03:00
intel_gsc_proxy.h
intel_gsc_uc_debugfs.c
intel_gsc_uc_debugfs.h
intel_gsc_uc_heci_cmd_submit.c drm/i915/pxp/mtl: Update pxp-firmware response timeout 2023-09-19 12:11:18 -07:00
intel_gsc_uc_heci_cmd_submit.h drm/i915/pxp/mtl: Update pxp-firmware response timeout 2023-09-19 12:11:18 -07:00
intel_gsc_uc.c drm/i915: Do not attempt to load the GSC multiple times 2024-09-02 13:25:13 +03:00
intel_gsc_uc.h
intel_guc_ads.c drm/i915/guc: Extend w/a 14019159160 2024-07-18 12:51:56 -07:00
intel_guc_ads.h
intel_guc_capture.c drm/i915/guc: Correct capture of EIR register on hang 2024-03-04 15:35:22 -08:00
intel_guc_capture.h
intel_guc_ct.c drm/i915/guc: Create the guc_to_i915() wrapper 2023-12-08 12:31:01 +01:00
intel_guc_ct.h drm/i915/guc: Add CT size delay helper 2023-10-18 06:01:09 +02:00
intel_guc_debugfs.c
intel_guc_debugfs.h
intel_guc_fw.c drm/i915: use IS_ENABLED() instead of defined() on config options 2024-09-05 21:12:08 +03:00
intel_guc_fw.h
intel_guc_fwif.h drm/i915/guc: Enable PXP GuC autoteardown flow 2024-10-14 13:06:45 -07:00
intel_guc_hwconfig.c drm/i915/guc: Use the new gt_to_guc() wrapper 2024-03-01 13:19:43 +01:00
intel_guc_log_debugfs.c
intel_guc_log_debugfs.h
intel_guc_log.c Merge tag 'drm-intel-gt-next-2025-01-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-01-13 08:05:00 +10:00
intel_guc_log.h
intel_guc_print.h
intel_guc_rc.c drm/i915/guc: Create the guc_to_i915() wrapper 2023-12-08 12:31:01 +01:00
intel_guc_rc.h
intel_guc_reg.h
intel_guc_slpc_types.h
intel_guc_slpc.c drm/i915/guc: Use context hints for GT frequency 2024-03-07 10:25:06 -08:00
intel_guc_slpc.h drm/i915/guc: Use context hints for GT frequency 2024-03-07 10:25:06 -08:00
intel_guc_submission.c drm/i915/gt: Use spin_lock_irqsave() in interruptible context 2025-02-17 09:22:29 -05:00
intel_guc_submission.h drm/i915/guc: Flush context destruction worker at suspend 2024-01-09 09:33:07 -08:00
intel_guc.c drm/i915/guc: Enable PXP GuC autoteardown flow 2024-10-14 13:06:45 -07:00
intel_guc.h Merge tag 'drm-intel-gt-next-2024-04-26' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-next 2024-04-30 14:40:43 +10:00
intel_huc_debugfs.c
intel_huc_debugfs.h
intel_huc_fw.c
intel_huc_fw.h
intel_huc_print.h
intel_huc.c Merge tag 'drm-intel-gt-next-2025-01-10' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-next 2025-01-13 08:05:00 +10:00
intel_huc.h drm/i915: Remove unused intel_huc_suspend 2024-12-30 01:31:45 +01:00
intel_uc_debugfs.c
intel_uc_debugfs.h
intel_uc_fw_abi.h
intel_uc_fw.c drm/i915: ARL requires a newer GSC firmware 2024-08-27 13:23:58 +03:00
intel_uc_fw.h drm/i915: Do not attempt to load the GSC multiple times 2024-09-02 13:25:13 +03:00
intel_uc.c drm/i915: Replace double blank with single blank after comma in gem/ and gt/ 2024-08-08 11:40:41 +01:00
intel_uc.h
selftest_guc_hangcheck.c drm/i915/guc: Fix for potential false positives in GuC hang selftest 2023-11-30 13:50:49 -08:00
selftest_guc_multi_lrc.c
selftest_guc.c drm/i915/guc: Use the new gt_to_guc() wrapper 2024-03-01 13:19:43 +01:00