mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Thomas Gleixner <tglx@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Marc Zyngier <maz@kernel.org>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Inochi Amaoto <inochiama@gmail.com>,
	Nam Cao <namcao@linutronix.de>,
	Shradha Gupta <shradhagupta@linux.microsoft.com>,
	Randy Dunlap <rdunlap@infradead.org>
Cc: Xunlei Pang <xlpang@linux.alibaba.com>,
	oliver.yang@linux.alibaba.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI/MSI: Update MSI-X irq domain hwsize
Date: Wed, 25 Mar 2026 16:40:58 +0800	[thread overview]
Message-ID: <d57bf449-cd26-4fbd-891e-77534124e997@linux.alibaba.com> (raw)
In-Reply-To: <87mrzwfj7z.ffs@tglx>



在 2026/3/25 15:42, Thomas Gleixner 写道:
> On Wed, Mar 25 2026 at 09:34, Guixin Liu wrote:
>> 在 2026/3/24 21:59, Thomas Gleixner 写道:
>>> On Tue, Mar 24 2026 at 09:47, Guixin Liu wrote:
>>>> After the upper-layer driver removes the device and before the next
>>>> probe, events such as firmware updates may increase the number of
>>>> interrupts supported by the device. However, the irq_domain still
>>>> retains the old hwsize, which causes subsequent interrupt allocation
>>>> failures. Update hwsize during MSI-X device domain setup to fix this
>>>> issue.
>>> When a device is removed then the corresponding struct device is torn
>>> down, which implies that the device domain is freed as well. So how can
>>> this end up with the old state on the next probe?
>> Hi, My description was a bit ambiguous. The msi_device_data_release()
>> path to remove the irq_domain is only triggered when the device is
>> removed at the PCI layer. If only the upper-layer driver unbinds,
>> this path will not be reached.
> What's an upper-layer driver? Please be precise.
>
> I assume you are talking about the device driver itself.
Sorry, My description is not very accurate, yes, it's device driver.
> Right, the
> unbind of the driver won't remove the domain. But there is no real good
> reason for keeping it around at that point.
>
> So the straight forward solution is to free the MSI domain when the
> driver shuts down and tears the MSI interrupts down.
Yes, I had also considered this aspect before, I will change the scheme 
to this,
and send another patch, thanks.

Best Regards,
Guixin Liu
>
> Thanks,
>
>          tglx
>


  reply	other threads:[~2026-03-25  8:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24  1:47 [PATCH 0/2] " Guixin Liu
2026-03-24  1:47 ` [PATCH 1/2] genirq/msi: Introduce update hwsize helper Guixin Liu
2026-03-25  8:15   ` Thomas Gleixner
2026-03-25  8:49     ` Guixin Liu
2026-03-24  1:47 ` [PATCH 2/2] PCI/MSI: Update MSI-X irq domain hwsize Guixin Liu
2026-03-24 13:59   ` Thomas Gleixner
2026-03-25  1:34     ` Guixin Liu
2026-03-25  7:42       ` Thomas Gleixner
2026-03-25  8:40         ` Guixin Liu [this message]
2026-03-25 13:58           ` Thomas Gleixner
2026-03-26  1:55             ` Guixin Liu
2026-03-31 13:46   ` kernel test robot

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=d57bf449-cd26-4fbd-891e-77534124e997@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=bhelgaas@google.com \
    --cc=inochiama@gmail.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maz@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=oliver.yang@linux.alibaba.com \
    --cc=rdunlap@infradead.org \
    --cc=shradhagupta@linux.microsoft.com \
    --cc=tglx@kernel.org \
    --cc=xlpang@linux.alibaba.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

Powered by JetHome