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 C9A63C433FE for ; Sat, 27 Nov 2021 01:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232879AbhK0B1s (ORCPT ); Fri, 26 Nov 2021 20:27:48 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:36594 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347320AbhK0BZK (ORCPT ); Fri, 26 Nov 2021 20:25:10 -0500 Message-ID: <20211126230525.256653991@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976042; 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=W0h8cFkpSlrjWKkacc77gmgmQ9hJjfO/HefW6QQlYnQ=; b=r4eal6rIfDIoamvlWEISLX+P71N4hhZWD6sAKPeFo0r/w9+NdyQL8mH9WU9ard2q78GBGM puSfzbYsc/CLTm4wMoatWZX8JGm4zcDz4aypqFRJVzPwpahZK4bLGm8GmHxqVRFswULQN0 vxOuVPmklXTu1Dt3I0tBOTNgRG0Sn42XfnNRTSfuGvZb5z0VAdT9OkLzq3IHXHIVqeB93p 6gSP3m2B7KtG9jwXFYWdBmrxG0dhkXKDqJjtZ7VFkiA3Wet92nFLuAj2ktppNDpf85Evr9 iBbS8mzN6/r/uRiEFpkV7cESINPLw2PRGvei1yfLXYzA9yftlrSnsJt6JFh6dA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976042; 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=W0h8cFkpSlrjWKkacc77gmgmQ9hJjfO/HefW6QQlYnQ=; b=exDXzbWNyzm8lpC8blE93+qo6A6+cBUS2GiuAcExzXacXAdgjQYexIMIGb0pS8kwazFa+i WxdkIBqLR1OS8LDw== 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 22/37] x86/apic/msi: 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:42 +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/kernel/apic/msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -160,11 +160,8 @@ static struct irq_chip pci_msi_controlle int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) { - struct pci_dev *pdev = to_pci_dev(dev); - struct msi_desc *desc = first_pci_msi_entry(pdev); - init_irq_alloc_info(arg, NULL); - if (desc->pci.msi_attrib.is_msix) { + if (msi_device_has_property(dev, MSI_PROP_PCI_MSIX)) { arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSIX; } else { arg->type = X86_IRQ_ALLOC_TYPE_PCI_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 C3FAFC433EF for ; Sat, 27 Nov 2021 01:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234183AbhK0Bx4 (ORCPT ); Fri, 26 Nov 2021 20:53:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbhK0Bvy (ORCPT ); Fri, 26 Nov 2021 20:51:54 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9400C07E5E5; Fri, 26 Nov 2021 17:25:42 -0800 (PST) Message-ID: <20211126230525.256653991@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976112; 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=W0h8cFkpSlrjWKkacc77gmgmQ9hJjfO/HefW6QQlYnQ=; b=F4ZLl3LVIalGx1nr8zVLN4qZ/kerGBNQpqO5YwHiasRWJghsRIfbflMcthfqI+iCXCq8eI wZYeWFPYfrYDaTYz29UJEA68CReYY3ynGXGguRFPy+j2mgbKeUJS/nr9XRM022ZojRHgp2 A024LiuABId6ikwybGCYm9PsFirU9ihvOON2CQPzQ9oNItc9+ZBh4rYbZoiVrYsfe6KFiG LzV8LY02rVe9jY8nR6yZNVpOa6fRKsZtEruEPzXYhe57Rmxht7yefXapbt9VAAZpay7hYh 9R4/vPx6fqzj0ZWXyFxBliQFsTeS4Ns3cRFBBgAej/AwkxiwAFpRHFozvL4mvw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976112; 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=W0h8cFkpSlrjWKkacc77gmgmQ9hJjfO/HefW6QQlYnQ=; b=o8kiWdx9jl5zPCSu4DW+wVgTHdK1AewHKh1zlz9tmI0YsrxRcKBO33H2yCj/pCYcOyBha5 mO1A4J6EQOpzSPAw== 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 22/37] x86/apic/msi: 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:52 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Message-ID: <20211127012152.72qq8tY6rZ3kSYna2OS03GS--uWIqfyqah5oKaWbHsY@z> instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/msi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -160,11 +160,8 @@ static struct irq_chip pci_msi_controlle int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) { - struct pci_dev *pdev = to_pci_dev(dev); - struct msi_desc *desc = first_pci_msi_entry(pdev); - init_irq_alloc_info(arg, NULL); - if (desc->pci.msi_attrib.is_msix) { + if (msi_device_has_property(dev, MSI_PROP_PCI_MSIX)) { arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSIX; } else { arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSI;