Skip to content

drm/xe: Initialize xe_guc_pc mutex before use

José Roberto de Souza requested to merge zehortigoza/kernel:xe into xe

[ 2244.679999] xe 0000:00:02.0: [drm:xe_reg_sr_apply_mmio [xe]] Applying vecs0 save-restore MMIOs [ 2244.689289] xe 0000:00:02.0: [drm:xe_guc_upload [xe]] GuC successfully loaded [ 2244.689908] xe 0000:00:02.0: [drm:xe_guc_ct_enable [xe]] GuC CT communication channel enabled [ 2244.690994] ------------[ cut here ]------------ [ 2244.695635] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 2244.695639] WARNING: CPU: 1 PID: 6752 at kernel/locking/mutex.c:582 __mutex_lock+0x47b/0x890 [ 2244.709053] Modules linked in: xe(+) drm_ttm_helper drm_suballoc_helper gpu_sched ttm mei_hdcp mei_pxp pmt_telemetry pmt_class x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel kvm_intel e1000e i2c_i801 mei_me ptp mei pps_core i2c_smbus intel_vsec fuse [ 2244.733940] CPU: 1 PID: 6752 Comm: modprobe Not tainted 5.19.0+zeh-xe+ #1744 [ 2244.740992] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.3425.A00.2010162309 10/16/2020 [ 2244.754362] RIP: 0010:__mutex_lock+0x47b/0x890 [ 2244.758820] Code: ff 85 c0 0f 84 0e fc ff ff 8b 0d a8 df e2 00 85 c9 0f 85 00 fc ff ff 48 c7 c6 c8 c1 58 82 48 c7 c7 cb 81 57 82 e8 19 75 f9 ff <0f> 0b e9 e6 fb ff ff f6 83 09 08 00 00 01 0f 85 4b ff ff ff 4c 89 [ 2244.777548] RSP: 0018:ffffc9000527bae0 EFLAGS: 00010282 [ 2244.782778] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 2244.789914] RDX: 0000000000000001 RSI: ffffffff825d3ce4 RDI: 00000000ffffffff [ 2244.797049] RBP: ffffc9000527bb70 R08: 00000000fffdffff R09: 00000000fffdffff [ 2244.804187] R10: ffff8884ae9fe000 R11: ffff8884ae9fe000 R12: 0000000000000002 [ 2244.811327] R13: 0000000000000000 R14: ffff888114ea2968 R15: ffff888114ea2968 [ 2244.818468] FS: 00007feb84611740(0000) GS:ffff88849e680000(0000) knlGS:0000000000000000 [ 2244.826559] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2244.832314] CR2: 0000558ca16f21a0 CR3: 0000000142984006 CR4: 0000000000770ee0 [ 2244.839451] PKRU: 55555554 [ 2244.842173] Call Trace: [ 2244.844632] [ 2244.846755] ? xe_guc_pc_start+0x3d7/0x550 [xe] [ 2244.851312] ? xe_guc_ct_send+0x48/0x80 [xe] [ 2244.855605] ? xe_guc_pc_start+0x3d7/0x550 [xe] [ 2244.860160] xe_guc_pc_start+0x3d7/0x550 [xe] [ 2244.864543] xe_uc_init_hw+0x8d/0xb0 [xe] [ 2244.868583] xe_gt_init+0x2b5/0x3f0 [xe] [ 2244.872534] xe_device_probe+0x116/0x170 [xe] [ 2244.876911] xe_pci_probe+0x2ae/0x3c0 [xe] [ 2244.881035] pci_device_probe+0x9f/0x150 [ 2244.884974] really_probe+0x1ba/0x380 [ 2244.888652] __driver_probe_device+0xfa/0x170 [ 2244.893017] driver_probe_device+0x1a/0x90 [ 2244.897122] __driver_attach+0xbd/0x1b0 [ 2244.900976] ? __device_attach_driver+0xe0/0xe0 [ 2244.905520] bus_for_each_dev+0x71/0xc0 [ 2244.909369] bus_add_driver+0x15e/0x210 [ 2244.913222] driver_register+0x84/0xe0 [ 2244.916996] ? xe_hw_fence_module_init+0x30/0x30 [xe] [ 2244.922068] do_one_initcall+0x55/0x2e0 [ 2244.925919] ? rcu_read_lock_sched_held+0x3a/0x70 [ 2244.930634] ? trace_kmalloc+0x33/0xe0 [ 2244.934399] ? kmem_cache_alloc_trace+0x1ce/0x330 [ 2244.939120] do_init_module+0x45/0x1c0 [ 2244.942885] __do_sys_finit_module+0xac/0x120 [ 2244.947251] do_syscall_64+0x37/0x90 [ 2244.950847] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 2244.955908] RIP: 0033:0x7feb84125f6d [ 2244.959496] Code: 28 0d 00 0f 05 eb a9 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d cb de 0c 00 f7 d8 64 89 01 48 [ 2244.978231] RSP: 002b:00007fff205687f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 2244.985812] RAX: ffffffffffffffda RBX: 0000555c1c553050 RCX: 00007feb84125f6d [ 2244.992956] RDX: 0000000000000000 RSI: 0000555c1a752260 RDI: 0000000000000007 [ 2245.000099] RBP: 0000000000040000 R08: 0000000000000000 R09: 0000000000000000 [ 2245.007234] R10: 0000000000000007 R11: 0000000000000246 R12: 0000555c1a752260 [ 2245.014377] R13: 0000000000000000 R14: 0000555c1c553180 R15: 0000555c1c553050 [ 2245.021519] [ 2245.023723] irq event stamp: 142351 [ 2245.027227] hardirqs last enabled at (142351): [] _raw_spin_unlock_irqrestore+0x4e/0x80 [ 2245.037038] hardirqs last disabled at (142350): [] _raw_spin_lock_irqsave+0x4e/0x50 [ 2245.046388] softirqs last enabled at (141816): [] irq_exit_rcu+0xbe/0x130 [ 2245.054830] softirqs last disabled at (141791): [] irq_exit_rcu+0xbe/0x130 [ 2245.063272] ---[ end trace 0000000000000000 ]--- [ 2245.070260] xe 0000:00:02.0: [drm:xe_huc_auth [xe]] HuC authenticated

Fixes: 7bb3d49f ("drm/xe: Fix GuC PC freq management upon GuC reload.") Signed-off-by: José Roberto de Souza jose.souza@intel.com

Merge request reports