Skip to content

Commit

Permalink
[MIPS] Alchemy: replace ffs() with __ffs()
Browse files Browse the repository at this point in the history
Fix havoc wrought by commit 56f621c --
au_ffs() and ffs() are equivalent, that patch should have just replaced one
with another.  Now replace ffs() with __ffs() which returns an unbiased bit
number.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Sergei Shtylyov authored and Ralf Baechle committed Dec 6, 2007
1 parent f435a91 commit 4b36673
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/mips/au1000/common/dbdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ dbdma_interrupt(int irq, void *dev_id)

intstat = dbdma_gptr->ddma_intstat;
au_sync();
chan_index = ffs(intstat);
chan_index = __ffs(intstat);

ctp = chan_tab_ptr[chan_index];
cp = ctp->chan_ptr;
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/au1000/common/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ static void intc0_req0_irqdispatch(void)
return;
}
#endif
bit = ffs(intc0_req0);
bit = __ffs(intc0_req0);
intc0_req0 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + bit);
}
Expand All @@ -478,7 +478,7 @@ static void intc0_req1_irqdispatch(void)
if (!intc0_req1)
return;

bit = ffs(intc0_req1);
bit = __ffs(intc0_req1);
intc0_req1 &= ~(1 << bit);
do_IRQ(bit);
}
Expand All @@ -498,7 +498,7 @@ static void intc1_req0_irqdispatch(void)
if (!intc1_req0)
return;

bit = ffs(intc1_req0);
bit = __ffs(intc1_req0);
intc1_req0 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit);
}
Expand All @@ -514,7 +514,7 @@ static void intc1_req1_irqdispatch(void)
if (!intc1_req1)
return;

bit = ffs(intc1_req1);
bit = __ffs(intc1_req1);
intc1_req1 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1200/irqmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ irqreturn_t pb1200_cascade_handler( int irq, void *dev_id)
bcsr->int_status = bisr;
for( ; bisr; bisr &= (bisr-1) )
{
extirq_nr = PB1200_INT_BEGIN + ffs(bisr);
extirq_nr = PB1200_INT_BEGIN + __ffs(bisr);
/* Ack and dispatch IRQ */
do_IRQ(extirq_nr);
}
Expand Down

0 comments on commit 4b36673

Please sign in to comment.