From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Thomas Gleixner <tglx@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <chleroy@kernel.org>,
Ritesh Harjani <ritesh.list@gmail.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Radu Rendec <radu@rendec.net>,
sbhat@linux.ibm.com, harshpb@linux.ibm.com, gautam@linux.ibm.com,
Nam Cao <namcao@linutronix.de>,
Nilay Shroff <nilay@linux.ibm.com>,
Vivian Wang <wangruikang@iscas.ac.cn>,
Shawn Lin <shawn.lin@rock-chips.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Jonathan Cameron <jic23@kernel.org>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Farhan Ali <alifm@linux.ibm.com>,
Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>,
Yuanhe Shu <xiangzao@linux.alibaba.com>,
Vidya Sagar <vidyas@nvidia.com>, Hans Zhang <18255117159@163.com>,
Miles Krause <mileskrause5200@gmail.com>,
Randy Dunlap <rdunlap@infradead.org>,
linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] powerpc/pseries/msi: Release RTAS MSI state on vector disable
Date: Fri, 4 Dec 2026 22:11:44 +0530 [thread overview]
Message-ID: <20261204164141.20530-6-nnmlinux@linux.ibm.com> (raw)
In-Reply-To: <20261204164141.20530-4-nnmlinux@linux.ibm.com>
Before commit daaa574aba6f ("powerpc/pseries/msi: Switch to
msi_create_parent_irq_domain()"), pSeries released its RTAS MSI
configuration from the legacy msi_post_free() callback when the MSI
or MSI-X vectors were freed.
The conversion to hierarchical MSI domains moved that release into
msi_ops->msi_teardown(), which runs when the per-device MSI domain is
destroyed. The PCI/MSI core normally retains that domain across a
complete vector disable, so freeing the vectors no longer necessarily
calls rtas_disable_msi(). A later allocation can reuse the existing
domain and skip msi_ops->msi_prepare(), leaving the RTAS configuration
unchanged even when the device has been reset or reconfigured between
allocations.
Set MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN for pSeries. This causes the
device MSI domain to be destroyed after normal vector disable or a
terminal enable failure. Domain teardown releases the RTAS
configuration, and the next allocation creates a fresh domain and runs
RTAS preparation again. Internal retries with fewer vectors continue to
reuse the prepared domain.
Fixes: daaa574aba6f ("powerpc/pseries/msi: Switch to msi_create_parent_irq_domain()")
Signed-off-by: Narayana Murty N <nnmlinux@linux.ibm.com>
---
arch/powerpc/platforms/pseries/msi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 8285b9a29fbf..6d5b1799c5b7 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -517,7 +517,8 @@ static bool pseries_init_dev_msi_info(struct device *dev, struct irq_domain *dom
#define PSERIES_PCI_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS | \
MSI_FLAG_USE_DEF_CHIP_OPS | \
- MSI_FLAG_PCI_MSI_MASK_PARENT)
+ MSI_FLAG_PCI_MSI_MASK_PARENT | \
+ MSI_FLAG_PCI_MSI_TEARDOWN_DOMAIN)
#define PSERIES_PCI_MSI_FLAGS_SUPPORTED (MSI_GENERIC_FLAGS_MASK | \
MSI_FLAG_PCI_MSIX | \
MSI_FLAG_MSIX_CONTIGUOUS | \
--
2.54.0
prev parent reply other threads:[~2026-12-04 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 16:41 [PATCH 0/2] PCI/MSI: Allow opt-in domain teardown for pSeries RTAS Narayana Murty N
2026-12-04 16:41 ` [PATCH 1/2] PCI/MSI: Allow opt-in teardown of per-device MSI domains Narayana Murty N
2026-12-04 16:41 ` Narayana Murty N [this message]
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=20261204164141.20530-6-nnmlinux@linux.ibm.com \
--to=nnmlinux@linux.ibm.com \
--cc=18255117159@163.com \
--cc=alifm@linux.ibm.com \
--cc=bhelgaas@google.com \
--cc=chleroy@kernel.org \
--cc=gautam@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=jic23@kernel.org \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lpieralisi@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mileskrause5200@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=namcao@linutronix.de \
--cc=nilay@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=radu@rendec.net \
--cc=rafael.j.wysocki@intel.com \
--cc=rdunlap@infradead.org \
--cc=ritesh.list@gmail.com \
--cc=sbhat@linux.ibm.com \
--cc=shawn.lin@rock-chips.com \
--cc=sshegde@linux.ibm.com \
--cc=tglx@kernel.org \
--cc=vidyas@nvidia.com \
--cc=wangruikang@iscas.ac.cn \
--cc=xiangzao@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