Message ID | 20211206210438.851954664@linutronix.de (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> 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 8441BC433EF for <linux-pci@archiver.kernel.org>; Mon, 6 Dec 2021 22:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358210AbhLFWn5 (ORCPT <rfc822;linux-pci@archiver.kernel.org>); Mon, 6 Dec 2021 17:43:57 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:46598 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358836AbhLFWnC (ORCPT <rfc822;linux-pci@vger.kernel.org>); Mon, 6 Dec 2021 17:43:02 -0500 Message-ID: <20211206210438.851954664@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638830372; 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=w8UYsW5B4OWVVU7pGixKm7WjdRfdeuutiAGe4s0v9p0=; b=l6zogudvstk9l44X0viIhkG5kDqO2QITfTC/d6c2h5nF0bmVHp+7r1DJfsG/ZruoVdli7Q kfG2O1t6BSdlOTTFXP/352apOTG54Ck2H+zBZ4jRNvEdd2rGhJO3inv3BOHACLTb6TYZyu Q2V/5uUE3HP91uVco6VZYdigZWgY+laKfdDo2whpPbLjrNhc593tuDYHH2/thQ4KpWULpj /wjedyH/hE0QLxY/I26Q41gMLQnh1YrzDhx33dGkpZvJDGMc/fS1rdZrcqMrn5l6g529kV R+aSIlIAQGmAigY/kfdBWMI6uH4TUMx904zSAXJMmBTPK9awJPW1X6qPD+k2lg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638830372; 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=w8UYsW5B4OWVVU7pGixKm7WjdRfdeuutiAGe4s0v9p0=; b=1xxMH04pcreVhZpk3wJ/Fhx5cI4CNMyZzzmHHBHwM2cNv/9cju8D+JoXNUQFM7sNVHTuzl IA0azIbovmraB6AA== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: Bjorn Helgaas <helgaas@kernel.org>, Marc Zygnier <maz@kernel.org>, Alex Williamson <alex.williamson@redhat.com>, Kevin Tian <kevin.tian@intel.com>, Jason Gunthorpe <jgg@nvidia.com>, Megha Dey <megha.dey@intel.com>, Ashok Raj <ashok.raj@intel.com>, linux-pci@vger.kernel.org, Cedric Le Goater <clg@kaod.org>, xen-devel@lists.xenproject.org, Juergen Gross <jgross@suse.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Will Deacon <will@kernel.org>, Santosh Shilimkar <ssantosh@kernel.org>, iommu@lists.linux-foundation.org, dmaengine@vger.kernel.org, Stuart Yoder <stuyoder@gmail.com>, Laurentiu Tudor <laurentiu.tudor@nxp.com>, Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>, linux-arm-kernel@lists.infradead.org, Vinod Koul <vkoul@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Robin Murphy <robin.murphy@arm.com>, Sinan Kaya <okaya@kernel.org> Subject: [patch V2 22/36] genirq/msi: Use device MSI properties References: <20211206210307.625116253@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Mon, 6 Dec 2021 23:39:31 +0100 (CET) Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org |
Series |
genirq/msi, PCI/MSI: Spring cleaning - Part 2
|
expand
|
--- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -122,21 +122,8 @@ int msi_setup_device_data(struct device static ssize_t msi_mode_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct msi_desc *entry; - bool is_msix = false; - unsigned long irq; - int retval; - - retval = kstrtoul(attr->attr.name, 10, &irq); - if (retval) - return retval; - - entry = irq_get_msi_desc(irq); - if (!entry) - return -ENODEV; - - if (dev_is_pci(dev)) - is_msix = entry->pci.msi_attrib.is_msix; + /* MSI vs. MSIX is per device not per interrupt */ + bool is_msix = msi_device_has_property(dev, MSI_PROP_PCI_MSIX); return sysfs_emit(buf, "%s\n", is_msix ? "msix" : "msi"); }