aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/msi.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-09-18 00:25:57 +0100
committerJan Beulich <jbeulich@suse.com>2011-09-18 00:25:57 +0100
commitac4afd4aaac5f8e6e706f97bbfb0bd925577ed15 (patch)
tree4c996b4c24c2844879582e35036eafb3355d0d53 /xen/arch/x86/msi.c
parenta71eeb324fcc21bb2789917601326a2dfc220704 (diff)
downloadxen-ac4afd4aaac5f8e6e706f97bbfb0bd925577ed15.tar.gz
xen-ac4afd4aaac5f8e6e706f97bbfb0bd925577ed15.tar.bz2
xen-ac4afd4aaac5f8e6e706f97bbfb0bd925577ed15.zip
pass struct irq_desc * to all other IRQ accessors
This is again because the descriptor is generally more useful (with the IRQ number being accessible in it if necessary) and going forward will hopefully allow to remove all direct accesses to the IRQ descriptor array, in turn making it possible to make this some other, more efficient data structure. This additionally makes the .end() accessor optional, noting that in a number of cases the functions were empty. Signed-off-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/msi.c')
-rw-r--r--xen/arch/x86/msi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index d169a15676..5ff4e3d098 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -336,11 +336,11 @@ int msi_maskable_irq(const struct msi_desc *entry)
|| entry->msi_attrib.maskbit;
}
-static void msi_set_mask_bit(unsigned int irq, int flag)
+static void msi_set_mask_bit(struct irq_desc *desc, int flag)
{
- struct msi_desc *entry = irq_desc[irq].msi_desc;
+ struct msi_desc *entry = desc->msi_desc;
- ASSERT(spin_is_locked(&irq_desc[irq].lock));
+ ASSERT(spin_is_locked(&desc->lock));
BUG_ON(!entry || !entry->dev);
switch (entry->msi_attrib.type) {
case PCI_CAP_ID_MSI:
@@ -387,14 +387,14 @@ static int msi_get_mask_bit(const struct msi_desc *entry)
return -1;
}
-void mask_msi_irq(unsigned int irq)
+void mask_msi_irq(struct irq_desc *desc)
{
- msi_set_mask_bit(irq, 1);
+ msi_set_mask_bit(desc, 1);
}
-void unmask_msi_irq(unsigned int irq)
+void unmask_msi_irq(struct irq_desc *desc)
{
- msi_set_mask_bit(irq, 0);
+ msi_set_mask_bit(desc, 0);
}
static struct msi_desc* alloc_msi_entry(void)
@@ -978,7 +978,7 @@ int pci_restore_msi_state(struct pci_dev *pdev)
write_msi_msg(entry, &entry->msg);
- msi_set_mask_bit(irq, entry->msi_attrib.masked);
+ msi_set_mask_bit(desc, entry->msi_attrib.masked);
if ( entry->msi_attrib.type == PCI_CAP_ID_MSI )
msi_set_enable(pdev, 1);