Received: by 2002:a19:ef0c:0:0:0:0:0 with SMTP id n12csp950223lfh; Tue, 1 Feb 2022 12:51:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJC9yI/34p4fqwgXs4XrkQiIwf+Z1oILDpElI/qUtclBzCvCu/95dTsQmYWkWLhnX+Btup X-Received: by 2002:a63:d546:: with SMTP id v6mr21543410pgi.171.1643748709948; Tue, 01 Feb 2022 12:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748709; cv=none; d=google.com; s=arc-20160816; b=TUTBilB0oa89VNbStSbUO6FSQ0xIkCPr0WKjwdk4P00P+5o+DEa2Nb+RHBmv2fbgBk 9VKXRz5X+TKKtZL1z35cNhpSqUM4mPL5gIKby6BM6MI5UaiQB4y+shziW7AxpIBdPKZv DudBerWeyC1fHR2tNGBfX4QvQbIkL2cvgfGvELVgHoGajprYzAyJy4LdKS8QZg444zc0 t1OFW/EY2ueH6Vy26dDekRnqgMjwDm7C7FjSwSq+1Br6/jG2TIUO0KDs2N3FsOxUhPzk canGk4G/9LECaFJ9gtmqKxjEYDyaE45OUZtqlpjp159itS9pZtwctVqgqnd2o17LPA1z HRSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:sender:dkim-signature; bh=HIrK/ll1TuZEnp2gfWjGUr6nhrl/RDbWrtbWrrFF7+Q=; b=ZjUpdikYYqP/LTSNvbjqsbILLNjc/VQMc26fa7QApdJvyBlWiS1ZL5DgjhAQHdbySi 00wzhqQGYKP161spv7W79wgW/njXz/pCPj3o8MZBvwbR7BE1RwdUKbMyPN4CvGexlYm9 4+UMCdoj3lNliKwbjXesgqnVXU+sXTAq74sSWdYpxVT8rqrpyoCv7AZKV3jmll6J/93t g8MSCm6LhS5sF05iEBiTWI9RnRVirrtlqGsHymzBMvnQsVEiBAniCskGNtZUMgQuKqyw gT6jNBI8XK1fDxfKPFu5dLvgSytidm4n0T2xYgYnPbo4VZgacwSwgBILgPIpA7h9XvkK HDAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FWRJLJWX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s201si16585658pfc.217.2022.02.01.12.51.38; Tue, 01 Feb 2022 12:51:49 -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=@gmail.com header.s=20210112 header.b=FWRJLJWX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233473AbiAaW3x (ORCPT + 99 others); Mon, 31 Jan 2022 17:29:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbiAaW3v (ORCPT ); Mon, 31 Jan 2022 17:29:51 -0500 Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FDF4C061714; Mon, 31 Jan 2022 14:29:51 -0800 (PST) Received: by mail-oo1-xc33.google.com with SMTP id i10-20020a4aab0a000000b002fccf890d5fso1184584oon.5; Mon, 31 Jan 2022 14:29:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=HIrK/ll1TuZEnp2gfWjGUr6nhrl/RDbWrtbWrrFF7+Q=; b=FWRJLJWX37blE6SLGzHmlsU0MZaU9sC2V0CKgL2guyKi7ulFdCvCxfSgomLcISQkgy Ghq8SQIK4GU/McVbpX2lJ7OYShY6Lw5N7YDemT7S61dxt4UkLuWkbDmiWtLV762XImzN iPIwaCk0oidTkqG5YTSOx1D94ZX/cJ8UT38VexR809vDAIRCTgiUw9WdmH8i4zF4TaOY sjkQKwFCacqbbThjmKuhVAZ23rOdKjSaGbe/NcrwAPbrDF4+HCEGEKm+QiAzCwCa95P5 wn42EJBxoXEh5EO4PWRYI2RctRR7vXFMjMJ7lAfqUaFIvg6vDktEasPwIfoCZezXf5fQ Un3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mime-version:content-disposition; bh=HIrK/ll1TuZEnp2gfWjGUr6nhrl/RDbWrtbWrrFF7+Q=; b=LZydyWNLzjjrXekEBEDMi+1DtqWEz46mcIuliURlIbxfOFs7Gfq+X0aTLiWUqQcIMV l8vMOTHFYjhhvC5d+h4U176fFGeKS3uLp+nqlDuSgfsknO6wCADQnTTUaRjEoJ9BfTYK gDjOmJCzGinivtuzsbxA3xdm9sY+B0qaqTBjaDpWcxLuXOBgU7kxH27KkqVspEA3D5K7 0GkzT9Y/aQoi5XLOJCzCf0zJk0asPlql3dXN/+k5LBvrjjt2Urdr6qbyhlJoIYa7cQjJ F5tyWKSlRQ0Bx6z43MkqWeiEnkfpRwmzmYZwdo5g+kvZTuKBsueN7XN9zXg2vHX5L9PS 8UzA== X-Gm-Message-State: AOAM531Q8s21KAFttdmLg9VSfBCSwn97vFquogY4f1O/88rwhyqhEONg POKbweP91bFBpLYhPxxG9Qg= X-Received: by 2002:a4a:7656:: with SMTP id w22mr11304612ooe.79.1643668190906; Mon, 31 Jan 2022 14:29:50 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id g4sm9441095otg.61.2022.01.31.14.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 14:29:50 -0800 (PST) Sender: Guenter Roeck Date: Mon, 31 Jan 2022 14:29:49 -0800 From: Guenter Roeck To: Thomas Gleixner 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() Message-ID: <20220131222949.GA3467472@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 Tested-by: Guenter Roeck 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; > > /*