Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38159
b: refs/heads/master
c: e125146
h: refs/heads/master
i:
  38157: 71f7bd2
  38155: 2acd6f3
  38151: 32d2cc8
  38143: 9a2a82d
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Sep 26, 2006
1 parent 7e1d775 commit 954ace5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 94983cb7881dff760d724759105a6f67935b571d
refs/heads/master: e12514650b167f48e952d50315fd492d01d42988
19 changes: 10 additions & 9 deletions trunk/arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ unsigned int irq_alloc_virt(struct irq_host *host,
{
unsigned long flags;
unsigned int i, j, found = NO_IRQ;
unsigned int limit = irq_virq_count - count;

if (count == 0 || count > (irq_virq_count - NUM_ISA_INTERRUPTS))
return NO_IRQ;
Expand All @@ -794,14 +793,16 @@ unsigned int irq_alloc_virt(struct irq_host *host,
/* Look for count consecutive numbers in the allocatable
* (non-legacy) space
*/
for (i = NUM_ISA_INTERRUPTS; i <= limit; ) {
for (j = i; j < (i + count); j++)
if (irq_map[j].host != NULL) {
i = j + 1;
continue;
}
found = i;
break;
for (i = NUM_ISA_INTERRUPTS, j = 0; i < irq_virq_count; i++) {
if (irq_map[i].host != NULL)
j = 0;
else
j++;

if (j == count) {
found = i - count + 1;
break;
}
}
if (found == NO_IRQ) {
spin_unlock_irqrestore(&irq_big_lock, flags);
Expand Down

0 comments on commit 954ace5

Please sign in to comment.