Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251829
b: refs/heads/master
c: 4dd6029
h: refs/heads/master
i:
  251827: da40215
v: v3
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed May 26, 2011
1 parent 3be3a79 commit d31e935
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: 9b7882515864117d0015a3484c0ba0eee6713de9
refs/heads/master: 4dd602900196bcc00505485e2a363caec4f3fd93
17 changes: 13 additions & 4 deletions trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1007,14 +1007,23 @@ void irq_free_virt(unsigned int virq, unsigned int count)
WARN_ON (virq < NUM_ISA_INTERRUPTS);
WARN_ON (count == 0 || (virq + count) > irq_virq_count);

if (virq < NUM_ISA_INTERRUPTS) {
if (virq + count < NUM_ISA_INTERRUPTS)
return;
count =- NUM_ISA_INTERRUPTS - virq;
virq = NUM_ISA_INTERRUPTS;
}

if (count > irq_virq_count || virq > irq_virq_count - count) {
if (virq > irq_virq_count)
return;
count = irq_virq_count - virq;
}

raw_spin_lock_irqsave(&irq_big_lock, flags);
for (i = virq; i < (virq + count); i++) {
struct irq_host *host;

if (i < NUM_ISA_INTERRUPTS ||
(virq + count) > irq_virq_count)
continue;

host = irq_map[i].host;
irq_map[i].hwirq = host->inval_irq;
smp_wmb();
Expand Down

0 comments on commit d31e935

Please sign in to comment.