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 6F022C433F5 for ; Tue, 7 Dec 2021 21:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235878AbhLGVIk (ORCPT ); Tue, 7 Dec 2021 16:08:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236838AbhLGVIj (ORCPT ); Tue, 7 Dec 2021 16:08:39 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A5ADC061574; Tue, 7 Dec 2021 13:05:08 -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 sin.source.kernel.org (Postfix) with ESMTPS id 6F5A3CE1E6D; Tue, 7 Dec 2021 21:05:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4744FC341C1; Tue, 7 Dec 2021 21:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638911104; bh=B1uq1LxQ+zV7OmdTOwCRtNnO2jvBQqZ4s4dpqK7FSx0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FtAnSeLche3tDfxYR56d58ANFwkYFafEMJxsxNrKfqKSblB85o+rbHYZ0oIIlySDv tsgfTCkxzfo51fNQXVhI9AfB029y60Tf37iykBBNUPrO9avyXhGWg3TNkVZDa3+bLl MKDQoxA+9Eb/eCVob/myMBPCDOUC7Lks1kDQXL/5zr8Jhktfir9G8Gj5qdNVWJyvmY nSUYSnGBdz6NxEsdbnDrce0qOvuWXhcMslMcv0JD/Q3qxC0C9Ez3+52Iiaa26ekY+F 2GXwtyHKPUf3jS2KFP70m0i6puvts4TC/fan1RswEtNWghn5k8zw3s0sx0LXHK3Kax bg5UGKj2mjoaA== Date: Tue, 7 Dec 2021 15:05:03 -0600 From: Bjorn Helgaas To: Thomas Gleixner Cc: LKML , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , xen-devel@lists.xenproject.org, Juergen Gross , Greg Kroah-Hartman , Will Deacon , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, Vinod Koul , Mark Rutland , Robin Murphy , Sinan Kaya Subject: Re: [patch V2 19/36] PCI/MSI: Store properties in device::msi::data Message-ID: <20211207210503.GA77830@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211206210438.688216619@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On Mon, Dec 06, 2021 at 11:39:26PM +0100, Thomas Gleixner wrote: > Store the properties which are interesting for various places so the MSI > descriptor fiddling can be removed. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: Use the setter function > --- > drivers/pci/msi/msi.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -244,6 +244,8 @@ static void free_msi_irqs(struct pci_dev > iounmap(dev->msix_base); > dev->msix_base = NULL; > } > + > + msi_device_set_properties(&dev->dev, 0); > } > > static void pci_intx_for_msi(struct pci_dev *dev, int enable) > @@ -341,6 +343,7 @@ msi_setup_entry(struct pci_dev *dev, int > { > struct irq_affinity_desc *masks = NULL; > struct msi_desc *entry; > + unsigned long prop; > u16 control; > > if (affd) > @@ -372,6 +375,10 @@ msi_setup_entry(struct pci_dev *dev, int > if (entry->pci.msi_attrib.can_mask) > pci_read_config_dword(dev, entry->pci.mask_pos, &entry->pci.msi_mask); > > + prop = MSI_PROP_PCI_MSI; > + if (entry->pci.msi_attrib.is_64) > + prop |= MSI_PROP_64BIT; > + msi_device_set_properties(&dev->dev, prop); > out: > kfree(masks); > return entry; > @@ -514,6 +521,7 @@ static int msix_setup_entries(struct pci > if (masks) > curmsk++; > } > + msi_device_set_properties(&dev->dev, MSI_PROP_PCI_MSIX | MSI_PROP_64BIT); > ret = 0; > out: > kfree(masks); > 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 D1CE9C433EF for ; Tue, 7 Dec 2021 21:05:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 66E0F60648; Tue, 7 Dec 2021 21:05:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bZR_j7UJgfOV; Tue, 7 Dec 2021 21:05:09 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6BB5E60ED2; Tue, 7 Dec 2021 21:05:09 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 48915C002F; Tue, 7 Dec 2021 21:05:09 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 44F53C0012 for ; Tue, 7 Dec 2021 21:05:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 24AB383336 for ; Tue, 7 Dec 2021 21:05:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ITEs7y2RW_Af for ; Tue, 7 Dec 2021 21:05:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by smtp1.osuosl.org (Postfix) with ESMTPS id 76E1E832EB for ; Tue, 7 Dec 2021 21:05:07 +0000 (UTC) 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 CEB9BB81E89; Tue, 7 Dec 2021 21:05:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4744FC341C1; Tue, 7 Dec 2021 21:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638911104; bh=B1uq1LxQ+zV7OmdTOwCRtNnO2jvBQqZ4s4dpqK7FSx0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FtAnSeLche3tDfxYR56d58ANFwkYFafEMJxsxNrKfqKSblB85o+rbHYZ0oIIlySDv tsgfTCkxzfo51fNQXVhI9AfB029y60Tf37iykBBNUPrO9avyXhGWg3TNkVZDa3+bLl MKDQoxA+9Eb/eCVob/myMBPCDOUC7Lks1kDQXL/5zr8Jhktfir9G8Gj5qdNVWJyvmY nSUYSnGBdz6NxEsdbnDrce0qOvuWXhcMslMcv0JD/Q3qxC0C9Ez3+52Iiaa26ekY+F 2GXwtyHKPUf3jS2KFP70m0i6puvts4TC/fan1RswEtNWghn5k8zw3s0sx0LXHK3Kax bg5UGKj2mjoaA== Date: Tue, 7 Dec 2021 15:05:03 -0600 From: Bjorn Helgaas To: Thomas Gleixner Subject: Re: [patch V2 19/36] PCI/MSI: Store properties in device::msi::data Message-ID: <20211207210503.GA77830@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211206210438.688216619@linutronix.de> Cc: Nishanth Menon , Mark Rutland , Stuart Yoder , linux-pci@vger.kernel.org, Will Deacon , Ashok Raj , Marc Zygnier , Sinan Kaya , Vinod Koul , Megha Dey , Jason Gunthorpe , xen-devel@lists.xenproject.org, Kevin Tian , Alex Williamson , Cedric Le Goater , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Juergen Gross , Tero Kristo , Greg Kroah-Hartman , LKML , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Robin Murphy X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, Dec 06, 2021 at 11:39:26PM +0100, Thomas Gleixner wrote: > Store the properties which are interesting for various places so the MSI > descriptor fiddling can be removed. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: Use the setter function > --- > drivers/pci/msi/msi.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -244,6 +244,8 @@ static void free_msi_irqs(struct pci_dev > iounmap(dev->msix_base); > dev->msix_base = NULL; > } > + > + msi_device_set_properties(&dev->dev, 0); > } > > static void pci_intx_for_msi(struct pci_dev *dev, int enable) > @@ -341,6 +343,7 @@ msi_setup_entry(struct pci_dev *dev, int > { > struct irq_affinity_desc *masks = NULL; > struct msi_desc *entry; > + unsigned long prop; > u16 control; > > if (affd) > @@ -372,6 +375,10 @@ msi_setup_entry(struct pci_dev *dev, int > if (entry->pci.msi_attrib.can_mask) > pci_read_config_dword(dev, entry->pci.mask_pos, &entry->pci.msi_mask); > > + prop = MSI_PROP_PCI_MSI; > + if (entry->pci.msi_attrib.is_64) > + prop |= MSI_PROP_64BIT; > + msi_device_set_properties(&dev->dev, prop); > out: > kfree(masks); > return entry; > @@ -514,6 +521,7 @@ static int msix_setup_entries(struct pci > if (masks) > curmsk++; > } > + msi_device_set_properties(&dev->dev, MSI_PROP_PCI_MSIX | MSI_PROP_64BIT); > ret = 0; > out: > kfree(masks); > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 96995C433F5 for ; Tue, 7 Dec 2021 21:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=fNpPLhQ93+fDA6KoIY4okva2/CxeE56L0SchEmomEgA=; b=QZ4CMi9EA9c2JK uOHqSVOoa4+QV6PNqbYQus9F1t/s6gfk6NpjqnySMqmBGcZn+BJ+PT6yzu0vKDF2y71gW4uI9mVJ+ wVrn3wfugGqvTcaTR981J/HTO7atagQwAyutqHMObGdkYnsp4OA1XhCIckJ/R4LGQr1KBB8bWWMmt CoFORrSsmcNVfDiN6ccL0OllHf0Pf6A7TY/t2GnK7qwYz7DRn+OHsgG3XyhPNTM2ZpfiU5+OJnmpv 4cUdq2qpB5MFG9IadKU/p8I6wYOW151S58XnK9TFqit/hF0I02Ysybdj73WknQ3PHT5M9yDE5N3TQ pRbVeGmzCAj44fv8es/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muheB-00A7Ml-5X; Tue, 07 Dec 2021 21:05:11 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muhe7-00A7LX-56 for linux-arm-kernel@lists.infradead.org; Tue, 07 Dec 2021 21:05:08 +0000 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 CEB9BB81E89; Tue, 7 Dec 2021 21:05:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4744FC341C1; Tue, 7 Dec 2021 21:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638911104; bh=B1uq1LxQ+zV7OmdTOwCRtNnO2jvBQqZ4s4dpqK7FSx0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FtAnSeLche3tDfxYR56d58ANFwkYFafEMJxsxNrKfqKSblB85o+rbHYZ0oIIlySDv tsgfTCkxzfo51fNQXVhI9AfB029y60Tf37iykBBNUPrO9avyXhGWg3TNkVZDa3+bLl MKDQoxA+9Eb/eCVob/myMBPCDOUC7Lks1kDQXL/5zr8Jhktfir9G8Gj5qdNVWJyvmY nSUYSnGBdz6NxEsdbnDrce0qOvuWXhcMslMcv0JD/Q3qxC0C9Ez3+52Iiaa26ekY+F 2GXwtyHKPUf3jS2KFP70m0i6puvts4TC/fan1RswEtNWghn5k8zw3s0sx0LXHK3Kax bg5UGKj2mjoaA== Date: Tue, 7 Dec 2021 15:05:03 -0600 From: Bjorn Helgaas To: Thomas Gleixner Cc: LKML , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Cedric Le Goater , xen-devel@lists.xenproject.org, Juergen Gross , Greg Kroah-Hartman , Will Deacon , Santosh Shilimkar , iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder , Laurentiu Tudor , Nishanth Menon , Tero Kristo , linux-arm-kernel@lists.infradead.org, Vinod Koul , Mark Rutland , Robin Murphy , Sinan Kaya Subject: Re: [patch V2 19/36] PCI/MSI: Store properties in device::msi::data Message-ID: <20211207210503.GA77830@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211206210438.688216619@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_130507_379141_1367B017 X-CRM114-Status: GOOD ( 17.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 06, 2021 at 11:39:26PM +0100, Thomas Gleixner wrote: > Store the properties which are interesting for various places so the MSI > descriptor fiddling can be removed. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: Use the setter function > --- > drivers/pci/msi/msi.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -244,6 +244,8 @@ static void free_msi_irqs(struct pci_dev > iounmap(dev->msix_base); > dev->msix_base = NULL; > } > + > + msi_device_set_properties(&dev->dev, 0); > } > > static void pci_intx_for_msi(struct pci_dev *dev, int enable) > @@ -341,6 +343,7 @@ msi_setup_entry(struct pci_dev *dev, int > { > struct irq_affinity_desc *masks = NULL; > struct msi_desc *entry; > + unsigned long prop; > u16 control; > > if (affd) > @@ -372,6 +375,10 @@ msi_setup_entry(struct pci_dev *dev, int > if (entry->pci.msi_attrib.can_mask) > pci_read_config_dword(dev, entry->pci.mask_pos, &entry->pci.msi_mask); > > + prop = MSI_PROP_PCI_MSI; > + if (entry->pci.msi_attrib.is_64) > + prop |= MSI_PROP_64BIT; > + msi_device_set_properties(&dev->dev, prop); > out: > kfree(masks); > return entry; > @@ -514,6 +521,7 @@ static int msix_setup_entries(struct pci > if (masks) > curmsk++; > } > + msi_device_set_properties(&dev->dev, MSI_PROP_PCI_MSIX | MSI_PROP_64BIT); > ret = 0; > out: > kfree(masks); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel