From: Thomas Gleixner <tglx@kernel.org>
To: Radu Rendec <rrendec@redhat.com>,
Jon Hunter <jonathanh@nvidia.com>,
Manivannan Sadhasivam <mani@kernel.org>
Cc: "Daniel Tsai" <danielsftsai@google.com>,
"Marek Behún" <kabel@kernel.org>,
"Krishna Chaitanya Chundru" <quic_krichai@quicinc.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Brian Masney" <bmasney@redhat.com>,
"Eric Chanudet" <echanude@redhat.com>,
"Alessandro Carminati" <acarmina@redhat.com>,
"Jared Kangas" <jkangas@redhat.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support
Date: Tue, 27 Jan 2026 11:30:23 +0100 [thread overview]
Message-ID: <87h5s7bb5s.ffs@tglx> (raw)
In-Reply-To: <221f6dadb6d8ce06f30a24baaa2777e90d75b130.camel@redhat.com>
On Mon, Jan 26 2026 at 17:26, Radu Rendec wrote:
> On Mon, 2026-01-26 at 22:07 +0000, Jon Hunter wrote:
>> > Jon, can you please validate that this happens as well on
>> >
>> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/msi
>>
>>
>> I tried this branch and I see suspend failing with that branch too. If I
>> revert this change on top of your branch or -next, I don't see any
>> problems.
>
> The closest hardware I have access to is Jetson Xavier NX, and you
> already mentioned you couldn't reproduce the issue there (and it looks
> like I can't even get a hold of that board anyway). So I'm going to ask
> you to test a few more things for me.
>
> Can you please apply the patch below on top of the previous one I sent?
> The suspect is the spinlock lock in irq_migrate_all_off_this_cpu(),
> although I can't think of any reason why it shouldn't be free. But I
> don't have any better idea, and I would like to narrow down the spot
> where hotplug gets stuck.
Can we please take a step back and think about what is actually
different when this change is in effect instead of halluzinating about
completely unrelated spinlocks?
Without this change the interrupt is ignored in the hotplug migration
because it has MSI_FLAG_NO_AFFINITY set.
Now with this new magic in place the following happens:
migrate_one_irq()
...
irq_do_set_affinity()
chip->irq_set_affinity() // --> msi_domain_set_affinity()
parent->chip->irq_set_affinity() // --> irq_chip_redirect_set_affinity()
update target_cpu/effective mask; // Benign
...
irq_chip_write_msi_msg() // --> pci_msi_domain_write_msg()
I'm pretty sure that this write screws things up because the
devices/busses are already frozen. It simply hangs there.
Usually this is prevented by this check in pci_msi_domain_write_msg():
if (dev->current_state != PCI_D0 || pci_dev_is_disconnected(dev))
do_nothing();
else ...
As the boot log contains this:
[ 44.101151] tegra194-pcie 14100000.pcie: Link didn't transition to L2 state
[ 44.110764] Disabling non-boot CPUs ...
... I suspect that there is some weirdness going on with this PCIe
controller which subsequently screws up the check.
The below untested hack should confirm that theory.
Thanks,
tglx
---
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -672,7 +672,11 @@ int msi_domain_set_affinity(struct irq_d
if (ret >= 0 && ret != IRQ_SET_MASK_OK_DONE) {
BUG_ON(irq_chip_compose_msi_msg(irq_data, msg));
msi_check_level(irq_data->domain, msg);
- irq_chip_write_msi_msg(irq_data, msg);
+ // Hack alert
+ struct irq_desc *desc = irq_data_to_desc(irq_data);
+
+ if (!(desc->istate & IRQS_SUSPENDED))
+ irq_chip_write_msi_msg(irq_data, msg);
}
return ret;
next prev parent reply other threads:[~2026-01-27 10:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 21:20 [PATCH v3 0/3] Enable MSI affinity support for dwc PCI Radu Rendec
2025-11-28 21:20 ` [PATCH v3 1/3] genirq: Add interrupt redirection infrastructure Radu Rendec
2025-12-15 21:34 ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2025-11-28 21:20 ` [PATCH v3 2/3] PCI: dwc: Code cleanup Radu Rendec
2025-12-15 21:34 ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2025-11-28 21:20 ` [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support Radu Rendec
2025-12-15 21:34 ` [tip: irq/msi] " tip-bot2 for Radu Rendec
2026-01-06 9:53 ` Jon Hunter
2026-01-06 15:07 ` Radu Rendec
2026-01-07 1:13 ` Radu Rendec
2026-01-20 18:01 ` [PATCH v3 3/3] " Jon Hunter
2026-01-20 22:30 ` Radu Rendec
2026-01-21 14:00 ` Jon Hunter
2026-01-22 23:31 ` Radu Rendec
2026-01-23 13:25 ` Jon Hunter
2026-01-26 7:59 ` Thomas Gleixner
2026-01-26 22:07 ` Jon Hunter
2026-01-26 22:26 ` Radu Rendec
2026-01-27 10:30 ` Thomas Gleixner [this message]
2026-01-27 13:34 ` Thomas Gleixner
2026-01-27 17:09 ` Jon Hunter
2026-01-27 21:30 ` [PATCH] genirq/redirect: Prevent writing MSI message on affinity change Thomas Gleixner
2026-01-29 22:51 ` [tip: irq/msi] " tip-bot2 for Thomas Gleixner
2026-03-26 3:48 ` [PATCH v3 3/3] PCI: dwc: Enable MSI affinity support Tsai Sung-Fu
2026-03-26 12:52 ` Thomas Gleixner
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=87h5s7bb5s.ffs@tglx \
--to=tglx@kernel.org \
--cc=acarmina@redhat.com \
--cc=bhelgaas@google.com \
--cc=bmasney@redhat.com \
--cc=danielsftsai@google.com \
--cc=echanude@redhat.com \
--cc=jingoohan1@gmail.com \
--cc=jkangas@redhat.com \
--cc=jonathanh@nvidia.com \
--cc=kabel@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=quic_krichai@quicinc.com \
--cc=robh@kernel.org \
--cc=rrendec@redhat.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