lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch V2 40/40] genirq/msi: Move msi_device_data to core
Date
Now that the platform MSI hack is gone, nothing needs to know about struct
msi_device_data outside of the core code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/msi.h | 22 ----------------------
kernel/irq/msi.c | 24 ++++++++++++++++++++++--
2 files changed, 22 insertions(+), 24 deletions(-)

--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -21,11 +21,7 @@
#include <linux/irqdomain_defs.h>
#include <linux/cpumask.h>
#include <linux/msi_api.h>
-#include <linux/xarray.h>
-#include <linux/mutex.h>
-#include <linux/list.h>
#include <linux/irq.h>
-#include <linux/bits.h>

#include <asm/msi.h>

@@ -212,24 +208,6 @@ enum msi_desc_filter {
MSI_DESC_ASSOCIATED,
};

-/**
- * msi_device_data - MSI per device data
- * @properties: MSI properties which are interesting to drivers
- * @mutex: Mutex protecting the MSI descriptor store
- * @__store: Xarray for storing MSI descriptor pointers
- * @__iter_idx: Index to search the next entry for iterators
- * @__iter_max: Index to limit the search
- * @__irqdomains: Per device interrupt domains
- */
-struct msi_device_data {
- unsigned long properties;
- struct mutex mutex;
- struct xarray __store;
- unsigned long __iter_idx;
- unsigned long __iter_max;
- struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS];
-};
-
int msi_setup_device_data(struct device *dev);

void msi_lock_descs(struct device *dev);
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -8,18 +8,38 @@
* This file contains common code to support Message Signaled Interrupts for
* PCI compatible and non PCI compatible devices.
*/
-#include <linux/types.h>
#include <linux/device.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/msi.h>
+#include <linux/mutex.h>
+#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
-#include <linux/pci.h>
+#include <linux/types.h>
+#include <linux/xarray.h>

#include "internals.h"

/**
+ * msi_device_data - MSI per device data
+ * @properties: MSI properties which are interesting to drivers
+ * @mutex: Mutex protecting the MSI descriptor store
+ * @__store: Xarray for storing MSI descriptor pointers
+ * @__iter_idx: Index to search the next entry for iterators
+ * @__iter_max: Index to limit the search
+ * @__irqdomains: Per device interrupt domains
+ */
+struct msi_device_data {
+ unsigned long properties;
+ struct mutex mutex;
+ struct xarray __store;
+ unsigned long __iter_idx;
+ unsigned long __iter_max;
+ struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS];
+};
+
+/**
* struct msi_ctrl - MSI internal management control structure
* @domid: ID of the domain on which management operations should be done
* @first: First (hardware) slot index to operate on
\
 
 \ /
  Last update: 2022-11-21 15:53    [W:0.197 / U:1.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site