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 7B6C7C4332F for ; Wed, 16 Nov 2022 16:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234135AbiKPQPC (ORCPT ); Wed, 16 Nov 2022 11:15:02 -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> 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); > > 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 CE9C4C433FE for ; Wed, 16 Nov 2022 16:15:51 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4NC7Sk2FYqz3f3q for ; Thu, 17 Nov 2022 03:15:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KVVezaQS; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=helgaas@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KVVezaQS; dkim-atps=neutral Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4NC7Rk6PYcz2xBV for ; Thu, 17 Nov 2022 03:14:58 +1100 (AEDT) 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 07A19B81DDE; Wed, 16 Nov 2022 16:14:55 +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 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-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: linux-pci@vger.kernel.org, Will Deacon , Lorenzo Pieralisi , Dave Jiang , Ashok Raj , Joerg Roedel , x86@kernel.org, Jason Gunthorpe , Allen Hubbe , Kevin Tian , "Ahmed S. Darwish" , Jon Mason , linuxppc-dev@lists.ozlabs.org, Alex Williamson , Bjorn Helgaas , Dan Williams , Reinette Chatre , Greg Kroah-Hartman , LKML , Marc Zyngier , Logan Gunthorpe Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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); > >