Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: "Matthew Auld" <matthew.auld@intel.com>,
	intel-xe@lists.freedesktop.org,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH] drm/xe/mmio: Assert MMIO is available
Date: Thu, 28 May 2026 20:06:05 +0200	[thread overview]
Message-ID: <ahiEDVoZ3CxFqInC@black.igk.intel.com> (raw)
In-Reply-To: <553bcab7-0fb4-4797-ba13-c872ab2b5c18@intel.com>

On Thu, May 28, 2026 at 07:34:58PM +0200, Michal Wajdeczko wrote:
> On 5/28/2026 6:47 PM, Matthew Auld wrote:
> > On 28/05/2026 17:16, Michal Wajdeczko wrote:

...

> >> and the fact that mmio.regs is still non-NULL and points to the connected HW, is just our luck?
> >>
> >> maybe we should kill the HW immediately on pci.remove, if it is still present, and just unwind SW state using devm/drmm actions?
> > 
> > devm is for unwinding hw related state, 
> 
> hmm, are we 100% sure?
> 
> from [1] it looks that the devres rationale was about "leaking resources" problem and the example still shows that HW cleanup is part of the .remove hook:
> 
> my_remove_one()
> {
>       unregister_from_upper_layer(d);
>       shutdown_my_hardware();
> }
> 
> so maybe indeed we are little abusing the device model by touching the HW beyond the .remove?
> 
> [1] https://docs.kernel.org/driver-api/driver-model/devres.html

I'm doubtful because PCI core also hooks its hardware cleanup to devres.

1. pcim_enable_device()
2. pcim_set_mwi()
3. pcim_setup_msi_release()

Raag

  reply	other threads:[~2026-05-28 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 17:54 [PATCH] drm/xe/mmio: Assert MMIO is available Michal Wajdeczko
2026-05-27 19:39 ` ✓ CI.KUnit: success for " Patchwork
2026-05-27 20:31 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-05-28  4:40 ` ✗ Xe.CI.FULL: " Patchwork
2026-05-28  9:13 ` [PATCH] " Matthew Auld
2026-05-28 16:16   ` Michal Wajdeczko
2026-05-28 16:47     ` Matthew Auld
2026-05-28 17:34       ` Michal Wajdeczko
2026-05-28 18:06         ` Raag Jadav [this message]
2026-05-29  6:58         ` Matthew Auld
2026-05-28 17:43     ` Raag Jadav

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=ahiEDVoZ3CxFqInC@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.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