diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-11-23 05:55:58 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-11-23 07:01:45 -0500 |
commit | 23ed8d57f3b87520e045ba0e3a2340638b31198a (patch) | |
tree | 222cb094e843a7b495aee32adc7b728231e81f79 /include/linux/msi.h | |
parent | 83a18912b0e8d275001bca6fc9c0fe519d98f280 (diff) |
PCI/MSI: Rename mask/unmask_msi_irq et al
mask/unmask_msi_irq and __mask_msi/msix_irq are PCI/MSI specific
functions and should be named accordingly. This is a preparatory patch
to support MSI on non PCI devices.
Rename mask/unmask_msi_irq to pci_msi_mask/unmask_irq and document the
functions. Provide conversion helpers.
Rename __mask_msi/msix_irq to __pci_msi/msix_desc_mask so its clear
that they operated on msi_desc. Fixup the only user outside of
pci/msi.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Yijing Wang <wangyijing@huawei.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'include/linux/msi.h')
-rw-r--r-- | include/linux/msi.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index 301adecbc34d..1dcad0c1e806 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -14,14 +14,9 @@ extern int pci_msi_ignore_mask; | |||
14 | /* Helper functions */ | 14 | /* Helper functions */ |
15 | struct irq_data; | 15 | struct irq_data; |
16 | struct msi_desc; | 16 | struct msi_desc; |
17 | void mask_msi_irq(struct irq_data *data); | ||
18 | void unmask_msi_irq(struct irq_data *data); | ||
19 | void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 17 | void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
20 | void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); | 18 | void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); |
21 | 19 | ||
22 | u32 __msix_mask_irq(struct msi_desc *desc, u32 flag); | ||
23 | u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag); | ||
24 | |||
25 | struct msi_desc { | 20 | struct msi_desc { |
26 | struct { | 21 | struct { |
27 | __u8 is_msix : 1; | 22 | __u8 is_msix : 1; |
@@ -52,6 +47,11 @@ void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | |||
52 | void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 47 | void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
53 | void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg); | 48 | void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg); |
54 | 49 | ||
50 | u32 __pci_msix_desc_mask_irq(struct msi_desc *desc, u32 flag); | ||
51 | u32 __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag); | ||
52 | void pci_msi_mask_irq(struct irq_data *data); | ||
53 | void pci_msi_unmask_irq(struct irq_data *data); | ||
54 | |||
55 | /* Conversion helpers. Should be removed after merging */ | 55 | /* Conversion helpers. Should be removed after merging */ |
56 | static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) | 56 | static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) |
57 | { | 57 | { |
@@ -61,6 +61,14 @@ static inline void write_msi_msg(int irq, struct msi_msg *msg) | |||
61 | { | 61 | { |
62 | pci_write_msi_msg(irq, msg); | 62 | pci_write_msi_msg(irq, msg); |
63 | } | 63 | } |
64 | static inline void mask_msi_irq(struct irq_data *data) | ||
65 | { | ||
66 | pci_msi_mask_irq(data); | ||
67 | } | ||
68 | static inline void unmask_msi_irq(struct irq_data *data) | ||
69 | { | ||
70 | pci_msi_unmask_irq(data); | ||
71 | } | ||
64 | 72 | ||
65 | /* | 73 | /* |
66 | * The arch hooks to setup up msi irqs. Those functions are | 74 | * The arch hooks to setup up msi irqs. Those functions are |