From patchwork Sat Nov 27 01:20:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 12641969 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 AB5BFC4167B for ; Sat, 27 Nov 2021 01:25:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345689AbhK0B2U (ORCPT ); Fri, 26 Nov 2021 20:28:20 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:37362 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347868AbhK0B0H (ORCPT ); Fri, 26 Nov 2021 20:26:07 -0500 Message-ID: <20211126230525.432148049@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1637976047; 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=R5e0O3/cPtKTz28swaAQpwxXJzIJ0KDZCypBX7NJJUs=; b=1n7oWPvlZf1xqG6Sw+LVHR6RbnhIdn409ZgeaAT3nQ/uTiEZJj8qbhGRo2Hp13JC71Sw14 B6R7uoa2QCejc2UUGcypq/q7tYpI6GAZazBi1svWlXijtjO8MDV9by/U//aLSEXrMBhmEo 1XHTnjiajvaAlTv3SSj52TxIywHy5rK0mPsVWCDObhAI8WzzYsjmKssz9Uf7QXmav9wkhd UpxZqVvs/0/Jwj7FYcWOU9N14DVD4Bp06tmK85PYK80Li1jzm1ftGL3RZXmqjlkoU+NuEN HcfU+b866/pCAgBCvtxw/YKfDOv70fzufvhPSc6g7RsL3S6nKzJPZfVJF4tR1A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1637976047; 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=R5e0O3/cPtKTz28swaAQpwxXJzIJ0KDZCypBX7NJJUs=; b=de/BHQTomYdNMV5p6IjuUEGKCvLrIts4BHniXnUr81HjSGHocBuvhsDv6/YQyr/xEO1owH t/ukPevbzOfZelBw== 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 25/37] powerpc/pseries/msi: Use MSI device properties References: <20211126224100.303046749@linutronix.de> MIME-Version: 1.0 Date: Sat, 27 Nov 2021 02:20:46 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner --- arch/powerpc/platforms/pseries/msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c @@ -447,9 +447,9 @@ static int rtas_prepare_msi_irqs(struct static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) { + bool is_msix = msi_device_has_property(dev, MSI_PROP_PCI_MSIX); + int type = is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI; struct pci_dev *pdev = to_pci_dev(dev); - struct msi_desc *desc = first_pci_msi_entry(pdev); - int type = desc->pci.msi_attrib.is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI; return rtas_prepare_msi_irqs(pdev, nvec, type, arg); }