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 3411DC433EF for ; Sat, 27 Nov 2021 01:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232496AbhK0B1q (ORCPT ); Fri, 26 Nov 2021 20:27:46 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:36550 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242296AbhK0BZI (ORCPT ); Fri, 26 Nov 2021 20:25:08 -0500 Message-ID: <20211126230525.197675096@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=NeV9ZGHBl4mFlIql3fyxuMisNGkK+XSuThKmqvqjQGM=; b=JAdE2RyoX9GtBaSz3XfMgQXg5A/NS53ylKtJBy2FYBJyRR/2c2hRujC6kQQas6U4aD2+0T il3kAe620gXBh2tpN4EztArqGj5lweEIUqb8We13lnntLKJ2lcpnNAcAC5uH92Ch1ZKNlI fjQRhNyNyY6ZsqqWWTl1FWcn4ovC2GHDlwRnfyPJJLW04kbvwPCAdV9M2WJs7hefUFlWM0 5vG0b/g9sOSsvEgjsesKxV8SovgfpPl9MvPf4AnofnGApRJwTg/w28qZ7O22hIzVNj+k7S mb3YrIWu0YqWSjergcbz3XCUAVtPFomnRPz05AE09yfiKfanEBIir+crizE+MQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=NeV9ZGHBl4mFlIql3fyxuMisNGkK+XSuThKmqvqjQGM=; b=5sHfgyo6g4VSOtX0bdl9wuxhxIatjMau8XPLOklJTwt1QUazIyuZKEgfNEnoMLAykxpAxu wxnlzZgIUND/2IDw== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , 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, x86@kernel.org, Vinod Koul , Mark Rutland , Will Deacon , Sinan Kaya Subject: [patch 21/37] x86/pci/XEN: Use device MSI properties References: <20211126224100.303046749@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Sat, 27 Nov 2021 02:20:40 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner --- arch/x86/pci/xen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -399,9 +399,7 @@ static void xen_teardown_msi_irqs(struct static void xen_pv_teardown_msi_irqs(struct pci_dev *dev) { - struct msi_desc *msidesc = first_pci_msi_entry(dev); - - if (msidesc->pci.msi_attrib.is_msix) + if (msi_device_has_property(&dev->dev, MSI_PROP_PCI_MSIX)) xen_pci_frontend_disable_msix(dev); else xen_pci_frontend_disable_msi(dev); @@ -417,7 +415,7 @@ static int xen_msi_domain_alloc_irqs(str if (WARN_ON_ONCE(!dev_is_pci(dev))) return -EINVAL; - if (first_msi_entry(dev)->pci.msi_attrib.is_msix) + if (msi_device_has_property(dev, MSI_PROP_PCI_MSIX)) type = PCI_CAP_ID_MSIX; else type = PCI_CAP_ID_MSI; 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 241E1C433F5 for ; Sat, 27 Nov 2021 01:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348302AbhK0Bxy (ORCPT ); Fri, 26 Nov 2021 20:53:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbhK0Bvx (ORCPT ); Fri, 26 Nov 2021 20:51:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57313C07E5E4; Fri, 26 Nov 2021 17:25:42 -0800 (PST) Message-ID: <20211126230525.197675096@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=NeV9ZGHBl4mFlIql3fyxuMisNGkK+XSuThKmqvqjQGM=; b=hsuhEFrYb43Iubtxj3Grl7x3h4HHXSbkTJ7Wyjmct4XsaWaCG97Zt0ym/l1UbK1ZMjmvtR o7rKIXs8jRhoKgJrULGUGOND28kI6LTQumtOO5093BW37WCkJfqeGw3AouA+ST1BiiSLXS MocbcmU1wlMkyF6+nuwd74NW1yMtuuOLLtq3bBAyYsW1k8BNIQ5t2zWCAN/NobFwvJbsDQ YLKu4/dxcAiAaHh3tFIdbO1Vy3Wag+YXUm15xkA+USxGkWhd2rR/QOIVjoBDGWwC4UHQot fquLSoQkrLO6fcq+GmLU4aKK40umKr1K/fUHSRdATKc/pd96BnPEwWMrB7ZScw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=NeV9ZGHBl4mFlIql3fyxuMisNGkK+XSuThKmqvqjQGM=; b=baZF/vP1BvWHNL96TVwdguIiQnAcN5ifaY2PRBojw6k9mwyGOID8bKdiNiKeK4v482Sn0q +rCZsYO0FauzSKCg== From: Thomas Gleixner To: LKML Cc: Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, Greg Kroah-Hartman , 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, x86@kernel.org, Vinod Koul , Mark Rutland , Will Deacon , Sinan Kaya Subject: [patch 21/37] x86/pci/XEN: Use device MSI properties References: <20211126224100.303046749@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Sat, 27 Nov 2021 02:21:50 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Message-ID: <20211127012150.4rSXc7g-9_qPY38B15ImAk4MHxsDWcKAx83U1tUjWt8@z> instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner --- arch/x86/pci/xen.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -399,9 +399,7 @@ static void xen_teardown_msi_irqs(struct static void xen_pv_teardown_msi_irqs(struct pci_dev *dev) { - struct msi_desc *msidesc = first_pci_msi_entry(dev); - - if (msidesc->pci.msi_attrib.is_msix) + if (msi_device_has_property(&dev->dev, MSI_PROP_PCI_MSIX)) xen_pci_frontend_disable_msix(dev); else xen_pci_frontend_disable_msi(dev); @@ -417,7 +415,7 @@ static int xen_msi_domain_alloc_irqs(str if (WARN_ON_ONCE(!dev_is_pci(dev))) return -EINVAL; - if (first_msi_entry(dev)->pci.msi_attrib.is_msix) + if (msi_device_has_property(dev, MSI_PROP_PCI_MSIX)) type = PCI_CAP_ID_MSIX; else type = PCI_CAP_ID_MSI;