Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38421
b: refs/heads/master
c: 3fc471e
h: refs/heads/master
i:
  38419: 7dd471f
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Oct 4, 2006
1 parent 74ee7db commit 3f81025
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6cf2583ba026ca563ff8b15805fcf30b8e192a7
refs/heads/master: 3fc471ede99579211c44b6a64829c4318976990f
48 changes: 48 additions & 0 deletions trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,6 +2483,54 @@ static int __init ioapic_init_sysfs(void)

device_initcall(ioapic_init_sysfs);

#ifdef CONFIG_PCI_MSI
/*
* Dynamic irq allocate and deallocation for MSI
*/
int create_irq(void)
{
/* Hack of the day: irq == vector.
*
* Ultimately this will be be more general,
* and not depend on the irq to vector identity mapping.
* But this version is needed until msi.c can cope with
* the more general form.
*/
int irq, vector;
unsigned long flags;
vector = assign_irq_vector(AUTO_ASSIGN);
irq = vector;

if (vector >= 0) {
struct irq_desc *desc;

spin_lock_irqsave(&vector_lock, flags);
vector_irq[vector] = irq;
irq_vector[irq] = vector;
spin_unlock_irqrestore(&vector_lock, flags);

set_intr_gate(vector, interrupt[irq]);

dynamic_irq_init(irq);
}
return irq;
}

void destroy_irq(unsigned int irq)
{
unsigned long flags;
unsigned int vector;

dynamic_irq_cleanup(irq);

spin_lock_irqsave(&vector_lock, flags);
vector = irq_vector[irq];
vector_irq[vector] = -1;
irq_vector[irq] = 0;
spin_unlock_irqrestore(&vector_lock, flags);
}
#endif /* CONFIG_PCI_MSI */

/* --------------------------------------------------------------------------
ACPI-based IOAPIC Configuration
-------------------------------------------------------------------------- */
Expand Down

0 comments on commit 3f81025

Please sign in to comment.