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;