Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp903827pxb; Tue, 1 Feb 2022 12:50:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1zq21V0WvDzPA7f6XV0kCUexcwPyt9f/iPVNAFuaoSujvNDYhkwt5Onn7qz2QRUg9fu1H X-Received: by 2002:a17:90a:9c5:: with SMTP id 63mr4345572pjo.144.1643748635777; Tue, 01 Feb 2022 12:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748635; cv=none; d=google.com; s=arc-20160816; b=xf4JXdEYkaC5r8hiJlcF9kFtRV9kQAtkPi9NgtIMT4iE1w6yZ1fpv3tyvGgS7C3FOe IGXGWI+Thiq6hGUV2TTYi2sJXmIDxPKg2UJ+uXGpyvNOv2pZmYSdJsqf7M7tPqSVQYeM /qRbFS4RyKfB1tDmkCkD3+ZIdncJ0r5EBT8MOZ4CReRQ1xU3+qWZX89KYh9l7p/IDkcB 68t+b+Bq+mkIEmN5rzgkxq6XW3HCLjAaudy8NbQLJT3ZjVrP3dOr5h2kv6zNmTTBOoZl sbfW7jGQAvna/Mz5p32h/NsbMrO0G2FeGE48GKl61DEUau8fRCDmeJJaElGC4nycc4sM W7Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=tU8NK9NTEirj5O/+bd9d0PukMKUVqECyFzPD3aLKDXk=; b=UWvahAZhhwC5FLDG2t5e8fFvHaJJOGzzuheP9rxjQ+xaJ05DiLBapQwA6MDtET25Yf X5naxFDk8inB9PviVhjlVR+PSgPJ0awySKeh4sXvSCCfJPaSAltI+AlH5WvCSOxYVjf7 KAekQ+Vd4MIKtO8b+BO670J4fQkprX8IUOJsuQSZNgDDXFGOHWsfpfdZoJ+QnPg4cTcq 85OY7ueWBjR9dpMUB9yOO+tdmDl2pQB99UpfkmYRfkiGAHgY2Cb8dbziTH+Exf5AYZpD ZRVrE5UgaeU9agfHZaTPMoX056ZkTArL/6oOrD04VpnG7o6nxkU5bxTF38gyV1vojdT0 NQYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KmPtM4Xy; dkim=neutral (no key) header.i=@linutronix.de header.b=+0otG72A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si16900266plz.351.2022.02.01.12.50.24; Tue, 01 Feb 2022 12:50:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KmPtM4Xy; dkim=neutral (no key) header.i=@linutronix.de header.b=+0otG72A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379546AbiAaVQo (ORCPT + 99 others); Mon, 31 Jan 2022 16:16:44 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:34332 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232007AbiAaVQn (ORCPT ); Mon, 31 Jan 2022 16:16:43 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643663802; 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=tU8NK9NTEirj5O/+bd9d0PukMKUVqECyFzPD3aLKDXk=; b=KmPtM4XylI1QpBV825qhL/YVm9F73QsW9H0dQ5UPcPGil3mXgUuoX3HprH/+a3ZG/ShNJr BjlGsc1ndAOmgHyQvIvZUOUD6HLDHOBCi/Ji6X9uEEf7jDK1BzH1apOdzDHBzBMfjkAtXZ 8BD8lWMmiKDXbdlCTK3THWqdS9xoq1KFr2G35OtVX67EMI6vGc6c9cosnIZIpe5sYh+au2 PL1LZWmdvONdEfE18CsyjWjHM6gOUgcS0xyBIooTsaH48TF002qdkFf00iF1dJ2JVj/0SI eh6W7ozcJJE4CPYA3I/LgUWnchhhUB5lvUTPvZV1OWQ8MM0o/wu35qDKV5db6w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643663802; 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=tU8NK9NTEirj5O/+bd9d0PukMKUVqECyFzPD3aLKDXk=; b=+0otG72AhE6uKJBBtoOAEgmDIjBRXfGv02FMllL7V8PEVFVne4ebGZPaDcAGYon+0st4ER /th5pds4YqGCrMCA== To: Guenter Roeck Cc: LKML , 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 , Vinod Koul , Marc Zygnier , dmaengine@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity() In-Reply-To: References: <87mtjc2lhe.ffs@tglx> Date: Mon, 31 Jan 2022 22:16:41 +0100 Message-ID: <87ee4n38sm.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Signed-off-by: Thomas Gleixner --- 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; /*