From: Guenter Roeck <linux@roeck-us.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Nishanth Menon <nm@ti.com>, Mark Rutland <mark.rutland@arm.com>,
Stuart Yoder <stuyoder@gmail.com>,
linux-pci@vger.kernel.org, Will Deacon <will@kernel.org>,
Peter Ujfalusi <peter.ujfalusi@gmail.com>,
Ashok Raj <ashok.raj@intel.com>,
Jassi Brar <jassisinghbrar@gmail.com>,
Sinan Kaya <okaya@kernel.org>, Vinod Koul <vkoul@kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>,
Megha Dey <megha.dey@intel.com>, Jason Gunthorpe <jgg@nvidia.com>,
xen-devel@lists.xenproject.org, Kevin Tian <kevin.tian@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
linuxppc-dev@lists.ozlabs.org,
Alex Williamson <alex.williamson@redhat.com>,
Cedric Le Goater <clg@kaod.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-arm-kernel@lists.infradead.org,
Juergen Gross <jgross@suse.com>, Tero Kristo <kristo@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
iommu@lists.linux-foundation.org, Marc Zygnier <maz@kernel.org>,
dmaengine@vger.kernel.org, Robin Murphy <robin.murphy@arm.com>
Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()
Date: Mon, 31 Jan 2022 14:29:49 -0800 [thread overview]
Message-ID: <20220131222949.GA3467472@roeck-us.net> (raw)
On Mon, Jan 31, 2022 at 10:16:41PM +0100, Thomas Gleixner wrote:
> Guenter,
>
> On Mon, Jan 31 2022 at 07:21, Guenter Roeck wrote:
> > Sure. Please see http://server.roeck-us.net/qemu/x86/.
> > The logs are generated with with v5.16.4.
>
> thanks for providing the data. It definitely helped me to leave the
> state of not seeing the wood for the trees. Fix below.
>
> Thanks,
>
> tglx
> ---
> Subject: PCI/MSI: Remove bogus warning in pci_irq_get_affinity()
> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Mon, 31 Jan 2022 22:02:46 +0100
>
> The recent overhaul of pci_irq_get_affinity() introduced a regression when
> pci_irq_get_affinity() is called for an MSI-X interrupt which was not
> allocated with affinity descriptor information.
>
> The original code just returned a NULL pointer in that case, but the rework
> added a WARN_ON() under the assumption that the corresponding WARN_ON() in
> the MSI case can be applied to MSI-X as well.
>
> In fact the MSI warning in the original code does not make sense either
> because it's legitimate to invoke pci_irq_get_affinity() for a MSI
> interrupt which was not allocated with affinity descriptor information.
>
> Remove it and just return NULL as the original code did.
>
> Fixes: f48235900182 ("PCI/MSI: Simplify pci_irq_get_affinity()")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Guenter
> ---
> drivers/pci/msi/msi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> --- a/drivers/pci/msi/msi.c
> +++ b/drivers/pci/msi/msi.c
> @@ -1111,7 +1111,8 @@ const struct cpumask *pci_irq_get_affini
> if (!desc)
> return cpu_possible_mask;
>
> - if (WARN_ON_ONCE(!desc->affinity))
> + /* MSI[X] interrupts can be allocated without affinity descriptor */
> + if (!desc->affinity)
> return NULL;
>
> /*
next reply other threads:[~2022-01-31 22:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 22:29 Guenter Roeck [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-12-10 22:18 [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2 Thomas Gleixner
2021-12-10 22:19 ` [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() Thomas Gleixner
2021-12-17 22:30 ` Nathan Chancellor
2021-12-18 10:25 ` Thomas Gleixner
2021-12-18 19:04 ` Nathan Chancellor
2021-12-18 20:25 ` Cédric Le Goater
2021-12-20 11:55 ` Thomas Gleixner
2022-01-30 17:12 ` Guenter Roeck
2022-01-31 11:27 ` Thomas Gleixner
2022-01-31 15:21 ` Guenter Roeck
2022-01-31 21:16 ` 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=20220131222949.GA3467472@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alex.williamson@redhat.com \
--cc=arnd@arndb.de \
--cc=ashok.raj@intel.com \
--cc=bhelgaas@google.com \
--cc=clg@kaod.org \
--cc=dmaengine@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=jgg@nvidia.com \
--cc=jgross@suse.com \
--cc=kevin.tian@intel.com \
--cc=kristo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=megha.dey@intel.com \
--cc=nm@ti.com \
--cc=okaya@kernel.org \
--cc=peter.ujfalusi@gmail.com \
--cc=robin.murphy@arm.com \
--cc=ssantosh@kernel.org \
--cc=stuyoder@gmail.com \
--cc=tglx@linutronix.de \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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 NNTP newsgroup(s).