Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60555
b: refs/heads/master
c: 6fde40f
h: refs/heads/master
i:
  60553: 32b538d
  60551: b098cb8
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jun 25, 2007
1 parent 46202be commit 1e54b53
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 35923f12e42a3baf4ac6da7c05cf5f7478e5a7c6
refs/heads/master: 6fde40f3f1a9641ea0a41471cea77f34c0cbb36f
32 changes: 21 additions & 11 deletions trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,25 @@ static void irq_radix_rdunlock(unsigned long flags)
local_irq_restore(flags);
}

static int irq_setup_virq(struct irq_host *host, unsigned int virq,
irq_hw_number_t hwirq)
{
/* Clear IRQ_NOREQUEST flag */
get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;

/* map it */
smp_wmb();
irq_map[virq].hwirq = hwirq;
smp_mb();

if (host->ops->map(host, virq, hwirq)) {
pr_debug("irq: -> mapping failed, freeing\n");
irq_free_virt(virq, 1);
return -1;
}

return 0;
}

unsigned int irq_create_mapping(struct irq_host *host,
irq_hw_number_t hwirq)
Expand Down Expand Up @@ -644,18 +663,9 @@ unsigned int irq_create_mapping(struct irq_host *host,
}
pr_debug("irq: -> obtained virq %d\n", virq);

/* Clear IRQ_NOREQUEST flag */
get_irq_desc(virq)->status &= ~IRQ_NOREQUEST;

/* map it */
smp_wmb();
irq_map[virq].hwirq = hwirq;
smp_mb();
if (host->ops->map(host, virq, hwirq)) {
pr_debug("irq: -> mapping failed, freeing\n");
irq_free_virt(virq, 1);
if (irq_setup_virq(host, virq, hwirq))
return NO_IRQ;
}

return virq;
}
EXPORT_SYMBOL_GPL(irq_create_mapping);
Expand Down

0 comments on commit 1e54b53

Please sign in to comment.