Skip to content

Commit 2fdda02

Browse files
committed
genirq/msi: Move msi_device_data to core
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 <[email protected]> Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Shivamurthy Shastri <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e989424 commit 2fdda02

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

include/linux/msi.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
#include <linux/irqdomain_defs.h>
2222
#include <linux/cpumask.h>
2323
#include <linux/msi_api.h>
24-
#include <linux/xarray.h>
25-
#include <linux/mutex.h>
26-
#include <linux/list.h>
2724
#include <linux/irq.h>
28-
#include <linux/bits.h>
2925

3026
#include <asm/msi.h>
3127

@@ -227,20 +223,6 @@ struct msi_dev_domain {
227223
struct irq_domain *domain;
228224
};
229225

230-
/**
231-
* msi_device_data - MSI per device data
232-
* @properties: MSI properties which are interesting to drivers
233-
* @mutex: Mutex protecting the MSI descriptor store
234-
* @__domains: Internal data for per device MSI domains
235-
* @__iter_idx: Index to search the next entry for iterators
236-
*/
237-
struct msi_device_data {
238-
unsigned long properties;
239-
struct mutex mutex;
240-
struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS];
241-
unsigned long __iter_idx;
242-
};
243-
244226
int msi_setup_device_data(struct device *dev);
245227

246228
void msi_lock_descs(struct device *dev);

kernel/irq/msi.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,33 @@
88
* This file contains common code to support Message Signaled Interrupts for
99
* PCI compatible and non PCI compatible devices.
1010
*/
11-
#include <linux/types.h>
1211
#include <linux/device.h>
1312
#include <linux/irq.h>
1413
#include <linux/irqdomain.h>
1514
#include <linux/msi.h>
15+
#include <linux/mutex.h>
16+
#include <linux/pci.h>
1617
#include <linux/slab.h>
1718
#include <linux/sysfs.h>
18-
#include <linux/pci.h>
19+
#include <linux/types.h>
20+
#include <linux/xarray.h>
1921

2022
#include "internals.h"
2123

24+
/**
25+
* struct msi_device_data - MSI per device data
26+
* @properties: MSI properties which are interesting to drivers
27+
* @mutex: Mutex protecting the MSI descriptor store
28+
* @__domains: Internal data for per device MSI domains
29+
* @__iter_idx: Index to search the next entry for iterators
30+
*/
31+
struct msi_device_data {
32+
unsigned long properties;
33+
struct mutex mutex;
34+
struct msi_dev_domain __domains[MSI_MAX_DEVICE_IRQDOMAINS];
35+
unsigned long __iter_idx;
36+
};
37+
2238
/**
2339
* struct msi_ctrl - MSI internal management control structure
2440
* @domid: ID of the domain on which management operations should be done

0 commit comments

Comments
 (0)