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 X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD4FFC433DF for ; Wed, 26 Aug 2020 20:21:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 79C632083B for ; Wed, 26 Aug 2020 20:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598473306; bh=YMfWFqC5hD4XcAvqBAU0k4rGeGVgIOGdihLkY7QIQuI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=OAF8Tecv2AY8xjJkqtdgFFN5+v0UELF2Zr3W7yKz2aqiAuS1B3uNKSkdWh8IGbQxh ucEUkIhtCjsxLQ55Cs1x2pgs7SM5UqtsaFIjfimEyRQl2RSQ9ioASjFtalugiX78Ve S7/sqPyIxnmLsQkBwIZaB/Yb0ibHaoMAdwoDvxZM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726609AbgHZUVp (ORCPT ); Wed, 26 Aug 2020 16:21:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:41574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbgHZUVo (ORCPT ); Wed, 26 Aug 2020 16:21:44 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A897E2076C; Wed, 26 Aug 2020 20:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598473303; bh=YMfWFqC5hD4XcAvqBAU0k4rGeGVgIOGdihLkY7QIQuI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NMTbNDQwmiy1TI7fQW+JBmDTTcazSYXOKy3VJ01rf1Ap90CQohqzakM3jl9iiJ6Du SP+RZY3eNF4e+puBPocRu65f+SDsiCWCqgkjpNooqC9R8TqsTM97vhGhGVPC/oD/qy 7abz/f4FoDiNVRC+OaPlMVmemXAtkSFDMTV+ZL3M= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kB1vS-006y5k-3Z; Wed, 26 Aug 2020 21:21:42 +0100 Date: Wed, 26 Aug 2020 21:21:40 +0100 Message-ID: <878se12m5n.wl-maz@kernel.org> From: Marc Zyngier To: Thomas Gleixner Cc: LKML , x86@kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Juergen Gross , Boris Ostrovsky , Stefano Stabellini , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams Subject: Re: [patch V2 19/46] x86/msi: Use generic MSI domain ops In-Reply-To: <20200826112332.564274859@linutronix.de> References: <20200826111628.794979401@linutronix.de> <20200826112332.564274859@linutronix.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, x86@kernel.org, joro@8bytes.org, iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, haiyangz@microsoft.com, jonathan.derrick@intel.com, baolu.lu@linux.intel.com, wei.liu@kernel.org, kys@microsoft.com, sthemmin@microsoft.com, steve.wahl@hpe.com, sivanich@hpe.com, rja@hpe.com, linux-pci@vger.kernel.org, bhelgaas@google.com, lorenzo.pieralisi@arm.com, konrad.wilk@oracle.com, xen-devel@lists.xenproject.org, jgross@suse.com, boris.ostrovsky@oracle.com, sstabellini@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, megha.dey@intel.com, jgg@mellanox.com, dave.jiang@intel.com, alex.williamson@redhat.com, jacob.jun.pan@intel.com, baolu.lu@intel.com, kevin.tian@intel.com, dan.j.williams@intel.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, 26 Aug 2020 12:16:47 +0100, Thomas Gleixner wrote: > > From: Thomas Gleixner > > pci_msi_get_hwirq() and pci_msi_set_desc are not longer special. Enable the > generic MSI domain ops in the core and PCI MSI code unconditionally and get > rid of the x86 specific implementations in the X86 MSI code and in the > hyperv PCI driver. > > Signed-off-by: Thomas Gleixner > > --- > arch/x86/include/asm/msi.h | 2 -- > arch/x86/kernel/apic/msi.c | 15 --------------- > drivers/pci/controller/pci-hyperv.c | 8 -------- > drivers/pci/msi.c | 4 ---- > kernel/irq/msi.c | 6 ------ > 5 files changed, 35 deletions(-) > > --- a/arch/x86/include/asm/msi.h > +++ b/arch/x86/include/asm/msi.h > @@ -9,6 +9,4 @@ typedef struct irq_alloc_info msi_alloc_ > int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, > msi_alloc_info_t *arg); > > -void pci_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc); > - > #endif /* _ASM_X86_MSI_H */ > --- a/arch/x86/kernel/apic/msi.c > +++ b/arch/x86/kernel/apic/msi.c > @@ -204,12 +204,6 @@ void native_teardown_msi_irq(unsigned in > irq_domain_free_irqs(irq, 1); > } > > -static irq_hw_number_t pci_msi_get_hwirq(struct msi_domain_info *info, > - msi_alloc_info_t *arg) > -{ > - return arg->hwirq; > -} > - > int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, > msi_alloc_info_t *arg) > { > @@ -228,17 +222,8 @@ int pci_msi_prepare(struct irq_domain *d > } > EXPORT_SYMBOL_GPL(pci_msi_prepare); > > -void pci_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc) > -{ > - arg->desc = desc; > - arg->hwirq = pci_msi_domain_calc_hwirq(desc); > -} > -EXPORT_SYMBOL_GPL(pci_msi_set_desc); I think that at this stage, pci_msi_domain_calc_hwirq() can be made static, as it was only ever exported for this call site. Nice cleanup! Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.