Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp845431rwb; Wed, 16 Nov 2022 08:22:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf7K5xrzyW4Q3k8spIKSjWVpH1SuiTtyfbGsYSYxRsafv84GprGBfayxnHHNkHcWsjkD1w+b X-Received: by 2002:a17:907:a806:b0:78d:36d8:1814 with SMTP id vo6-20020a170907a80600b0078d36d81814mr17697346ejc.99.1668615758618; Wed, 16 Nov 2022 08:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668615758; cv=none; d=google.com; s=arc-20160816; b=zNRYFYRv02KRbnsBbKaFWeoO+q9eVnOKC0tr2kp5MKZA85FKVbjpeuvjO7SCD4kKF6 7VIKu2eBJzkg6JNlTL0cV3N6KkzRRa45QpSHBRIz8PXnT+5A7CTh+1BgnZLV8dI96lBE YLEZ4Yr4PQbCRL8utSrmNDrXhixcypej32J801dL6roYq8Zfly2LHHRxtaBQT18l8zp6 567DkSQ/4cIuQWCyuu1RPxBVfjBxohsbCkQ3IOeCj4vWFbK0+Y9QXX471hCJy5HFCH/s UJVj1R0lqyuU42st6iLVGz2oTXpF/WKy2vOLXQxwFSAq/sNnsDNMjU9MBGcIQZy4h+u4 yPug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=xNu1qSqRG0fiqws1jVGd6NrWomy6Kg218xerDaLQiQQ=; b=C8HFxTkLAJ0OZgZOmWFbPvBRr+MI0Lg3x1ZUlvXcnZGWeBXbh5xYnzc+SPBge37qrf ceWFNd2hk8RagnYL/i2qAWIKplCsBxqtLWjNvlXLIr3Mqz+z6blssu3fC63/ACo5TPDL q6CPSN/NxajIkcgOgG5zc3LMTx2x71t6/IRoVaz5XHRq0gwrz29pXHSfmUH60JTmc/8I rDoUzAidIqt85P9q7eT8bwrDYtDaVdwSt6cvV5mnXOdB5WknYEOYNTBigwznzsnjnBJ6 1Fyhjkk0fQNmxM2ILQopoE5bmw7sOJzP/fgARz5HPiToMW/+TPGHK/OpA2KJ2+bwkvca P0zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KVVezaQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020a50998f000000b0046311e80ebcsi13788529edb.151.2022.11.16.08.22.16; Wed, 16 Nov 2022 08:22:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KVVezaQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234122AbiKPQPB (ORCPT + 91 others); Wed, 16 Nov 2022 11:15:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233672AbiKPQO5 (ORCPT ); Wed, 16 Nov 2022 11:14:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B96B56572; Wed, 16 Nov 2022 08:14:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E490DB81DA9; Wed, 16 Nov 2022 16:14:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6597FC433C1; Wed, 16 Nov 2022 16:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668615293; bh=3jHYcM7FuEy5OUC4SwSTcV7zvFrD7SfjF+WS6WLSYEU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=KVVezaQSNPVYb6hCL4ff6+8gaVLjNQPJM+j7z7JCIaGpO+komsTUSuLi7AaGOzhwx 2rzkGF4vJTL4L7hBaRSzNaVbPIYhYPStj02V14xUHiisGRvUlK97HBEKE7M7Bww+0X K2AiIEkcCTiXODDdyPz+Klh3LYdqOhQvDfsiQD12zd2yPyAmpfMrzUeYXtGZaIDhoy vzKRttMPALCM9fC3pVepzYVkmusgvF4WHsoHiaKoujfx367H6rM2jc5t0gd8uaauiJ krqJoKnB7FA/Id3APLTOCSgHib6+yUeAXjphnnV/0nn1YS28xUBriVTZGV1HdkLYZf pGD5rJUG1OPSQ== Date: Wed, 16 Nov 2022 10:14:52 -0600 From: Bjorn Helgaas To: Thomas Gleixner Cc: LKML , x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe , "Ahmed S. Darwish" , Reinette Chatre , Michael Ellerman , Christophe Leroy , linuxppc-dev@lists.ozlabs.org Subject: Re: [patch 13/39] PCI/MSI: Use msi_domain_info::bus_token Message-ID: <20221116161452.GA1114659@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221111122014.352437595@linutronix.de> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 11, 2022 at 02:54:35PM +0100, Thomas Gleixner wrote: > From: Ahmed S. Darwish > > Set the bus token in the msi_domain_info structure and let the core code > handle the update. > > Signed-off-by: Ahmed S. Darwish > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > --- a/drivers/pci/msi/irqdomain.c > +++ b/drivers/pci/msi/irqdomain.c > @@ -162,8 +162,6 @@ struct irq_domain *pci_msi_create_irq_do > struct msi_domain_info *info, > struct irq_domain *parent) > { > - struct irq_domain *domain; > - > if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE)) > info->flags &= ~MSI_FLAG_LEVEL_CAPABLE; > > @@ -178,13 +176,10 @@ struct irq_domain *pci_msi_create_irq_do > > /* PCI-MSI is oneshot-safe */ > info->chip->flags |= IRQCHIP_ONESHOT_SAFE; > + /* Let the core update the bus token */ > + info->bus_token = DOMAIN_BUS_PCI_MSI; > > - domain = msi_create_irq_domain(fwnode, info, parent); > - if (!domain) > - return NULL; > - > - irq_domain_update_bus_token(domain, DOMAIN_BUS_PCI_MSI); > - return domain; > + return msi_create_irq_domain(fwnode, info, parent); > } > EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain); > >