[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276F29068E4B9BEBD088F648C0A9@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Mon, 21 Nov 2022 03:26:10 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
CC: "x86@...nel.org" <x86@...nel.org>, Joerg Roedel <joro@...tes.org>,
"Will Deacon" <will@...nel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Lorenzo Pieralisi" <lorenzo.pieralisi@....com>,
Marc Zyngier <maz@...nel.org>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
Jason Gunthorpe <jgg@...lanox.com>,
"Jiang, Dave" <dave.jiang@...el.com>,
Alex Williamson <alex.williamson@...hat.com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
Logan Gunthorpe <logang@...tatee.com>,
"Raj, Ashok" <ashok.raj@...el.com>, Jon Mason <jdmason@...zu.us>,
Allen Hubbe <allenbh@...il.com>,
"Ahmed S. Darwish" <darwi@...utronix.de>,
"Chatre, Reinette" <reinette.chatre@...el.com>
Subject: RE: [patch 15/20] genirq/msi: Provide new domain id allocation
functions
> From: Thomas Gleixner <tglx@...utronix.de>
> Sent: Friday, November 18, 2022 8:26 PM
>
> >> + xa_for_each_range(xa, idx, desc, ctrl->first + base, ctrl->last + base) {
> >> + if (!msi_desc_match(desc, MSI_DESC_NOTASSOCIATED))
> >> + continue;
> >> +
> >> + /* This should return -ECONFUSED... */
> >> + if (WARN_ON_ONCE(allocated >= ctrl->nirqs))
> >> + return -EINVAL;
> >> +
> >
> > why is "==" an error?
>
> because if you get here _after_ having allocated all interrupts already
> then you have more descriptors than what you want to allocate, which
> should never happen right?
yes
Powered by blists - more mailing lists