aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/msi.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-11-23 05:55:58 -0500
committerThomas Gleixner <tglx@linutronix.de>2014-11-23 07:01:45 -0500
commit23ed8d57f3b87520e045ba0e3a2340638b31198a (patch)
tree222cb094e843a7b495aee32adc7b728231e81f79 /include/linux/msi.h
parent83a18912b0e8d275001bca6fc9c0fe519d98f280 (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.h18
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 */
15struct irq_data; 15struct irq_data;
16struct msi_desc; 16struct msi_desc;
17void mask_msi_irq(struct irq_data *data);
18void unmask_msi_irq(struct irq_data *data);
19void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); 17void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
20void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); 18void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg);
21 19
22u32 __msix_mask_irq(struct msi_desc *desc, u32 flag);
23u32 __msi_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
24
25struct msi_desc { 20struct 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);
52void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); 47void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
53void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg); 48void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg);
54 49
50u32 __pci_msix_desc_mask_irq(struct msi_desc *desc, u32 flag);
51u32 __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
52void pci_msi_mask_irq(struct irq_data *data);
53void 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 */
56static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) 56static 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}
64static inline void mask_msi_irq(struct irq_data *data)
65{
66 pci_msi_mask_irq(data);
67}
68static 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