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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92FCDC433EF for ; Sat, 18 Dec 2021 10:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbhLRKZR (ORCPT ); Sat, 18 Dec 2021 05:25:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbhLRKZQ (ORCPT ); Sat, 18 Dec 2021 05:25:16 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 834D4C061574; Sat, 18 Dec 2021 02:25:16 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=tn5AlMplZSyHPZ4eu4NMTH2tosi8XfO1/mNklSs+ImTlR8P5gfKJgKJLi6NJ4TFAklevD0 1avFcMo8k3hGWDd1Iy/rc1ZPeM7eACV1BbuVnX4QY/eXDhd48j/Sh4CvcSDSL9IbisUp7z caDqaSpU9ud+i2NkshpSak1RSaSSAW8O+tSdpPZC1vhiTXp+kGqQePG8eL1c519ZMa10bj 4A/PikhGc/SgM12CbM14omQUZtwMCPY58ymXGe2D8aFAWliD8DPNhbbTAoxPao+HsDqHhF X3Af3aTvpYn3Z94vxqiwZNOhBtC+RdSsTPCSCauo8T9TOXtM5vssh7kfd7kvGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=rrfck+zS5tliLA0jRIoJ5g0PCCswYFJD7whCSlQHRXayW7rMo7mOMzACWAo8/AkVTaI5km I03oaHuan7mQiiAA== To: Nathan Chancellor Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , Greg Kroah-Hartman , Juergen Gross , xen-devel@lists.xenproject.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , dmaengine@vger.kernel.org, Mark Rutland , Will Deacon , Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org, Jassi Brar , Peter Ujfalusi , Sinan Kaya Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() In-Reply-To: References: <20211210221642.869015045@linutronix.de> <20211210221814.900929381@linutronix.de> Date: Sat, 18 Dec 2021 11:25:14 +0100 Message-ID: <87v8zm9pmd.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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. 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); 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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 56CA8C433F5 for ; Sat, 18 Dec 2021 10:25:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id C5BD6409FD; Sat, 18 Dec 2021 10:25:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b09JDQfaXc8r; Sat, 18 Dec 2021 10:25:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 613E040103; Sat, 18 Dec 2021 10:25:20 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 39286C002F; Sat, 18 Dec 2021 10:25:20 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id A397BC0012 for ; Sat, 18 Dec 2021 10:25:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9F3CE42223 for ; Sat, 18 Dec 2021 10:25:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=linutronix.de header.b="tn5AlMpl"; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b="rrfck+zS" Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uYLyok0cX53i for ; Sat, 18 Dec 2021 10:25:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by smtp4.osuosl.org (Postfix) with ESMTPS id D7BC442211 for ; Sat, 18 Dec 2021 10:25:18 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=tn5AlMplZSyHPZ4eu4NMTH2tosi8XfO1/mNklSs+ImTlR8P5gfKJgKJLi6NJ4TFAklevD0 1avFcMo8k3hGWDd1Iy/rc1ZPeM7eACV1BbuVnX4QY/eXDhd48j/Sh4CvcSDSL9IbisUp7z caDqaSpU9ud+i2NkshpSak1RSaSSAW8O+tSdpPZC1vhiTXp+kGqQePG8eL1c519ZMa10bj 4A/PikhGc/SgM12CbM14omQUZtwMCPY58ymXGe2D8aFAWliD8DPNhbbTAoxPao+HsDqHhF X3Af3aTvpYn3Z94vxqiwZNOhBtC+RdSsTPCSCauo8T9TOXtM5vssh7kfd7kvGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=rrfck+zS5tliLA0jRIoJ5g0PCCswYFJD7whCSlQHRXayW7rMo7mOMzACWAo8/AkVTaI5km I03oaHuan7mQiiAA== To: Nathan Chancellor Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() In-Reply-To: References: <20211210221642.869015045@linutronix.de> <20211210221814.900929381@linutronix.de> Date: Sat, 18 Dec 2021 11:25:14 +0100 Message-ID: <87v8zm9pmd.ffs@tglx> MIME-Version: 1.0 Cc: Nishanth Menon , Mark Rutland , Stuart Yoder , Benjamin Herrenschmidt , Will Deacon , Ashok Raj , Michael Ellerman , 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 , Cedric Le Goater , Santosh Shilimkar , Bjorn Helgaas , Megha Dey , Juergen Gross , Tero Kristo , Greg Kroah-Hartman , LKML , Vinod Koul , Marc Zygnier , dmaengine@vger.kernel.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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. 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); _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 1559DC433EF for ; Sat, 18 Dec 2021 10:26:04 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JGMSp3NsYz3cPQ for ; Sat, 18 Dec 2021 21:26:02 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=tn5AlMpl; dkim=fail reason="signature verification failed" header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=rrfck+zS; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linutronix.de (client-ip=193.142.43.55; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=tn5AlMpl; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=rrfck+zS; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 4JGMS04SMhz2ym7 for ; Sat, 18 Dec 2021 21:25:20 +1100 (AEDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=tn5AlMplZSyHPZ4eu4NMTH2tosi8XfO1/mNklSs+ImTlR8P5gfKJgKJLi6NJ4TFAklevD0 1avFcMo8k3hGWDd1Iy/rc1ZPeM7eACV1BbuVnX4QY/eXDhd48j/Sh4CvcSDSL9IbisUp7z caDqaSpU9ud+i2NkshpSak1RSaSSAW8O+tSdpPZC1vhiTXp+kGqQePG8eL1c519ZMa10bj 4A/PikhGc/SgM12CbM14omQUZtwMCPY58ymXGe2D8aFAWliD8DPNhbbTAoxPao+HsDqHhF X3Af3aTvpYn3Z94vxqiwZNOhBtC+RdSsTPCSCauo8T9TOXtM5vssh7kfd7kvGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=rrfck+zS5tliLA0jRIoJ5g0PCCswYFJD7whCSlQHRXayW7rMo7mOMzACWAo8/AkVTaI5km I03oaHuan7mQiiAA== To: Nathan Chancellor Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() In-Reply-To: References: <20211210221642.869015045@linutronix.de> <20211210221814.900929381@linutronix.de> Date: Sat, 18 Dec 2021 11:25:14 +0100 Message-ID: <87v8zm9pmd.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 , 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 , Cedric Le Goater , Santosh Shilimkar , Bjorn Helgaas , Megha Dey , Laurentiu Tudor , Juergen Gross , Tero Kristo , Greg Kroah-Hartman , LKML , Vinod Koul , Marc Zygnier , 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 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. 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); 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E835EC433F5 for ; Sat, 18 Dec 2021 10:38:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RxcSO0/VRWsZ6Cb68llZcutEnqu6RxaOH2V9xad7DXc=; b=JO0oG49sXFXsMi uGlitbyRZXVPs33b34OqDLZxEuUSjIhTnwmfGz1xuy+MFZ3JnuEl0nQo9SSh+UVAkh57aDM3iWu7e IVX8X9eD30Nr2OC/6SjzwYsNKJYQQJNVxX+qi1T3J4dkYfZmnDbdhhjDZYyezPvI52sc22oDfdllI 52TvrC/jD2OZoXWGHsUxz0PRRiLlQj/pvKl9EKCk3n5A9RukTbGnj0KxfCoDhZZFuQCLO5Wq73cVb Nx7xOecKb1ZaFhZSPPNjoOD7ObnaAIVAlep30J6AJSVLZRPbrQw9j2yatleSJ9dqwSDhQxm4Ueppx Fd9d50UjjZKnAFc2MwDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myX4y-00DYU3-7c; Sat, 18 Dec 2021 10:36:41 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myWtw-00DVvi-SY for linux-arm-kernel@lists.infradead.org; Sat, 18 Dec 2021 10:25:18 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=tn5AlMplZSyHPZ4eu4NMTH2tosi8XfO1/mNklSs+ImTlR8P5gfKJgKJLi6NJ4TFAklevD0 1avFcMo8k3hGWDd1Iy/rc1ZPeM7eACV1BbuVnX4QY/eXDhd48j/Sh4CvcSDSL9IbisUp7z caDqaSpU9ud+i2NkshpSak1RSaSSAW8O+tSdpPZC1vhiTXp+kGqQePG8eL1c519ZMa10bj 4A/PikhGc/SgM12CbM14omQUZtwMCPY58ymXGe2D8aFAWliD8DPNhbbTAoxPao+HsDqHhF X3Af3aTvpYn3Z94vxqiwZNOhBtC+RdSsTPCSCauo8T9TOXtM5vssh7kfd7kvGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1639823115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nl4ddDnB1oKo0fcoNLd0K0Xuyht31044PvDVab+sRz0=; b=rrfck+zS5tliLA0jRIoJ5g0PCCswYFJD7whCSlQHRXayW7rMo7mOMzACWAo8/AkVTaI5km I03oaHuan7mQiiAA== To: Nathan Chancellor Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , Greg Kroah-Hartman , Juergen Gross , xen-devel@lists.xenproject.org, Arnd Bergmann , Michael Ellerman , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , dmaengine@vger.kernel.org, Mark Rutland , Will Deacon , Robin Murphy , Joerg Roedel , iommu@lists.linux-foundation.org, Jassi Brar , Peter Ujfalusi , Sinan Kaya Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() In-Reply-To: References: <20211210221642.869015045@linutronix.de> <20211210221814.900929381@linutronix.de> Date: Sat, 18 Dec 2021 11:25:14 +0100 Message-ID: <87v8zm9pmd.ffs@tglx> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211218_022517_113429_3B07A38F X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel