lkml.org 
[lkml]   [2021]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch 23/37] genirq/msi: Use device MSI properties
Date
instead of fiddling with MSI descriptors.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
---
kernel/irq/msi.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)

--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -114,21 +114,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");
}
\
 
 \ /
  Last update: 2021-11-27 02:25    [W:0.203 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site