From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9B91C433EF for ; Sat, 18 Dec 2021 20:26:21 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JGcnR6Fy4z3cN4 for ; Sun, 19 Dec 2021 07:26:19 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kaod.org (client-ip=46.105.45.231; helo=8.mo548.mail-out.ovh.net; envelope-from=clg@kaod.org; receiver=) Received: from 8.mo548.mail-out.ovh.net (8.mo548.mail-out.ovh.net [46.105.45.231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JGcmx5Nz7z2xgb for ; Sun, 19 Dec 2021 07:25:51 +1100 (AEDT) Received: from mxplan5.mail.ovh.net (unknown [10.109.138.121]) by mo548.mail-out.ovh.net (Postfix) with ESMTPS id 3A38A20143; Sat, 18 Dec 2021 20:25:43 +0000 (UTC) Received: from kaod.org (37.59.142.97) by DAG4EX1.mxp5.local (172.16.2.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Sat, 18 Dec 2021 21:25:41 +0100 Authentication-Results: garm.ovh; auth=pass (GARM-97G0022d2cf51f-56be-41f7-b9ac-2c271cc1d1bb, B1F2FCB93787BB0875C07E604CDE73E7ADF677F7) smtp.auth=clg@kaod.org X-OVh-ClientIp: 90.11.79.163 Message-ID: Date: Sat, 18 Dec 2021 21:25:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() Content-Language: en-US To: Thomas Gleixner , Nathan Chancellor References: <20211210221642.869015045@linutronix.de> <20211210221814.900929381@linutronix.de> <87v8zm9pmd.ffs@tglx> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= In-Reply-To: <87v8zm9pmd.ffs@tglx> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [37.59.142.97] X-ClientProxiedBy: DAG1EX1.mxp5.local (172.16.2.1) To DAG4EX1.mxp5.local (172.16.2.31) X-Ovh-Tracer-GUID: 2aa807ab-02a3-4ad6-8447-d206fc92c88e X-Ovh-Tracer-Id: 4883872323797683005 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvuddrleekgddufeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfhisehtkeertddtfeejnecuhfhrohhmpeevrogurhhitggpnfgvpgfiohgrthgvrhcuoegtlhhgsehkrghougdrohhrgheqnecuggftrfgrthhtvghrnhepieegvdffkeegfeetuddttddtveduiefhgeduffekiedtkeekteekhfffleevleelnecukfhppedtrddtrddtrddtpdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepmhigphhlrghnhedrmhgrihhlrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpegtlhhgsehkrghougdrohhrghdprhgtphhtthhopehokhgrhigrsehkvghrnhgvlhdrohhrgh X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Mark Rutland , Stuart Yoder , Will Deacon , Ashok Raj , Marc Zygnier , Joerg Roedel , Jassi Brar , Sinan Kaya , iommu@lists.linux-foundation.org, Peter Ujfalusi , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Jason Gunthorpe , linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, Kevin Tian , Arnd Bergmann , Robin Murphy , Alex Williamson , Santosh Shilimkar , Bjorn Helgaas , Megha Dey , Laurentiu Tudor , Juergen Gross , Tero Kristo , Greg Kroah-Hartman , LKML , Vinod Koul , dmaengine@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 12/18/21 11:25, Thomas Gleixner wrote: > On Fri, Dec 17 2021 at 15:30, Nathan Chancellor wrote: >> On Fri, Dec 10, 2021 at 11:19:26PM +0100, Thomas Gleixner wrote: >> I just bisected a boot failure on my AMD test desktop to this patch as >> commit f48235900182 ("PCI/MSI: Simplify pci_irq_get_affinity()") in >> -next. It looks like there is a problem with the NVMe drive after this >> change according to the logs. Given that the hard drive is not getting >> mounted for journald to write logs to, I am not really sure how to get >> them from the machine so I have at least taken a picture of what I see >> on my screen; open to ideas on that front! > > Bah. Fix below. That's a fix for the issue I was seeing on pseries with NVMe. Tested-by: Cédric Le Goater Thanks, C. > Thanks, > > tglx > --- > diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c > index 71802410e2ab..9b4910befeda 100644 > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -1100,7 +1100,7 @@ EXPORT_SYMBOL(pci_irq_vector); > */ > const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr) > { > - int irq = pci_irq_vector(dev, nr); > + int idx, irq = pci_irq_vector(dev, nr); > struct msi_desc *desc; > > if (WARN_ON_ONCE(irq <= 0)) > @@ -1113,7 +1113,10 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr) > > if (WARN_ON_ONCE(!desc->affinity)) > return NULL; > - return &desc->affinity[nr].mask; > + > + /* MSI has a mask array in the descriptor. */ > + idx = dev->msi_enabled ? nr : 0; > + return &desc->affinity[idx].mask; > } > EXPORT_SYMBOL(pci_irq_get_affinity); > >