intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 8/8] drm/xe/device: move xe_device_sanitize over to devm
Date: Mon, 6 May 2024 19:25:36 +0200	[thread overview]
Message-ID: <16054da5-fe08-4a48-8c42-a9e1f101e180@intel.com> (raw)
In-Reply-To: <20240429121436.33013-16-matthew.auld@intel.com>

On 29.04.2024 14:14, Matthew Auld wrote:
> Disable GuC submission when removing the device.
> 
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

I have tried to test whole patchset with
core_hotunplug@hotrebind
and I still observe attempts to call xe runtime_pm callbacks from 
removed driver(???):
[  135.059797] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88812b63c240 kmalloc (13 bytes)
[  135.059844] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88812b63d040 drm_gem_init_release (0 bytes)
[  135.059887] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88814f73b200 kmalloc (304 bytes)
[  135.059931] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88812b63c740 drm_minor_alloc_release (8 bytes)
[  135.059995] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff888115620708 kmalloc (40 bytes)
[  135.060065] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88812b63ca40 drm_minor_alloc_release (8 bytes)
[  135.060161] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff888115620a88 kmalloc (40 bytes)
[  135.060229] xe 0000:00:02.0: [drm:drm_managed_release [drm]] REL 
ffff88812d407e40 drm_dev_init_release (0 bytes)
[  135.060323] [drm:drm_managed_release [drm]] drmres release end
[  136.099951] general protection fault, probably for non-canonical 
address 0xdffffc00000004a3: 0000 [#1] PREEMPT SMP KASAN NOPTI
[  136.099969] KASAN: probably user-memory-access in range 
[0x0000000000002518-0x000000000000251f]
[  136.099977] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.9.0-rc2-xe+ #25
[  136.099985] Hardware name: Intel Corporation Raptor Lake Client 
Platform/RPL-S ADP-S DDR5 UDIMM CRB, BIOS 
RPLSFWI1.R00.4064.A02.2302091143 02/09/2023
[  136.099994] Workqueue: pm pm_runtime_work
[  136.100010] RIP: 0010:xe_pm_d3cold_allowed_toggle+0x2f/0x2d0 [xe]
[  136.100209] Code: 48 b8 00 00 00 00 00 fc ff df 55 48 89 e5 41 56 41 
55 41 54 53 48 89 fb 48 81 c7 18 25 00 00 48 89 fa 48 c1 ea 03 48 83 ec 
08 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 21 02 00 00
[  136.100228] RSP: 0018:ffffc900001d7be8 EFLAGS: 00010296
[  136.100237] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 
0000000000000000
[  136.100246] RDX: 00000000000004a3 RSI: 0000000000000000 RDI: 
0000000000002518
[  136.100255] RBP: ffffc900001d7c10 R08: ffff888117cf43c9 R09: 
ffff888117cf4220
[  136.100263] R10: 0000000000000000 R11: 0000000000000000 R12: 
ffff888117cf40c8
[  136.100271] R13: 0000000000000000 R14: ffffffff82dc8270 R15: 
ffff888117cf43c8
[  136.100280] FS:  0000000000000000(0000) GS:ffff88884dc00000(0000) 
knlGS:0000000000000000
[  136.100290] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  136.100298] CR2: 00005572f1fff388 CR3: 000000012134e000 CR4: 
0000000000750ef0
[  136.100307] PKRU: 55555554
[  136.100312] Call Trace:
[  136.100317]  <TASK>
[  136.100322]  ? show_regs+0x71/0x90
[  136.100331]  ? die_addr+0x41/0xc0
[  136.100339]  ? exc_general_protection+0x15d/0x260
[  136.100352]  ? asm_exc_general_protection+0x27/0x30
[  136.100361]  ? __pfx_pci_pm_runtime_idle+0x10/0x10
[  136.100373]  ? xe_pm_d3cold_allowed_toggle+0x2f/0x2d0 [xe]
[  136.100500]  ? __pfx_pci_pm_runtime_idle+0x10/0x10
[  136.100507]  xe_pci_runtime_idle+0x31/0x50 [xe]
[  136.100629]  pci_pm_runtime_idle+0xb7/0x100
[  136.100637]  rpm_idle+0x1ec/0x5c0
[  136.100646]  pm_runtime_work+0x10e/0x170
[  136.100653]  process_one_work+0x855/0x1a20
[  136.100665]  ? __pfx_process_one_work+0x10/0x10
[  136.100673]  ? move_linked_works+0x12b/0x2d0
[  136.100682]  ? assign_work+0x16f/0x280
[  136.100690]  worker_thread+0x57c/0xd40
[  136.100701]  kthread+0x2f3/0x3f0
[  136.100708]  ? __pfx_worker_thread+0x10/0x10
[  136.100716]  ? __pfx_kthread+0x10/0x10
[  136.100723]  ret_from_fork+0x43/0x90
[  136.100730]  ? __pfx_kthread+0x10/0x10
[  136.100737]  ret_from_fork_asm+0x1a/0x30
[  136.100748]  </TASK>



Regards
Andrzej

> ---
>   drivers/gpu/drm/xe/xe_device.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index ba917e383f8f..8c3415d7635a 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -395,7 +395,7 @@ static void xe_driver_flr_fini(void *arg)
>   		xe_driver_flr(xe);
>   }
>   
> -static void xe_device_sanitize(struct drm_device *drm, void *arg)
> +static void xe_device_sanitize(void *arg)
>   {
>   	struct xe_device *xe = arg;
>   	struct xe_gt *gt;
> @@ -661,7 +661,7 @@ int xe_device_probe(struct xe_device *xe)
>   
>   	xe_hwmon_register(xe);
>   
> -	return drmm_add_action_or_reset(&xe->drm, xe_device_sanitize, xe);
> +	return devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
>   
>   err_fini_display:
>   	xe_display_driver_remove(xe);


  reply	other threads:[~2024-05-06 17:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 12:14 [PATCH 1/8] drm/xe/device_sysfs: switch over to devm Matthew Auld
2024-04-29 12:14 ` [PATCH 2/8] drm/xe: covert sysfs " Matthew Auld
2024-04-29 13:28   ` Rodrigo Vivi
2024-04-29 13:52     ` Lucas De Marchi
2024-04-29 15:17       ` Matthew Auld
2024-04-29 18:45         ` Rodrigo Vivi
2024-04-29 21:28           ` Lucas De Marchi
2024-04-30  8:43             ` Jani Nikula
2024-04-30  9:42               ` Aravind Iddamsetty
2024-04-30 10:51                 ` Matthew Auld
2024-04-30 13:29             ` drmm vs devm (was Re: [PATCH 2/8] drm/xe: covert sysfs over to devm) Daniel Vetter
2024-05-06  8:07   ` [PATCH 2/8] drm/xe: covert sysfs over to devm Andrzej Hajda
2024-04-29 12:14 ` [PATCH 3/8] drm/xe/ggtt: use drm_dev_enter to mark device section Matthew Auld
2024-05-06  8:42   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 4/8] drm/xe/guc: move guc_fini over to devm Matthew Auld
2024-05-06  9:03   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 5/8] drm/xe/guc_pc: move pc_fini " Matthew Auld
2024-05-06  9:11   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 6/8] drm/xe/irq: move irq_uninstall over " Matthew Auld
2024-05-06  9:12   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 7/8] drm/xe/device: move flr " Matthew Auld
2024-05-06  9:12   ` Andrzej Hajda
2024-04-29 12:14 ` [PATCH 8/8] drm/xe/device: move xe_device_sanitize over " Matthew Auld
2024-05-06 17:25   ` Andrzej Hajda [this message]
2024-04-29 12:21 ` ✓ CI.Patch_applied: success for series starting with [1/8] drm/xe/device_sysfs: switch " Patchwork
2024-04-29 12:21 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-29 12:22 ` ✓ CI.KUnit: success " Patchwork
2024-05-06  8:04 ` [PATCH 1/8] " Andrzej Hajda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16054da5-fe08-4a48-8c42-a9e1f101e180@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).