Commit 4b366732 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Ralf Baechle

[MIPS] Alchemy: replace ffs() with __ffs()

Fix havoc wrought by commit 56f621c7 --
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: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent f435a91e
...@@ -859,7 +859,7 @@ dbdma_interrupt(int irq, void *dev_id) ...@@ -859,7 +859,7 @@ dbdma_interrupt(int irq, void *dev_id)
intstat = dbdma_gptr->ddma_intstat; intstat = dbdma_gptr->ddma_intstat;
au_sync(); au_sync();
chan_index = ffs(intstat); chan_index = __ffs(intstat);
ctp = chan_tab_ptr[chan_index]; ctp = chan_tab_ptr[chan_index];
cp = ctp->chan_ptr; cp = ctp->chan_ptr;
......
...@@ -462,7 +462,7 @@ static void intc0_req0_irqdispatch(void) ...@@ -462,7 +462,7 @@ static void intc0_req0_irqdispatch(void)
return; return;
} }
#endif #endif
bit = ffs(intc0_req0); bit = __ffs(intc0_req0);
intc0_req0 &= ~(1 << bit); intc0_req0 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + bit); do_IRQ(MIPS_CPU_IRQ_BASE + bit);
} }
...@@ -478,7 +478,7 @@ static void intc0_req1_irqdispatch(void) ...@@ -478,7 +478,7 @@ static void intc0_req1_irqdispatch(void)
if (!intc0_req1) if (!intc0_req1)
return; return;
bit = ffs(intc0_req1); bit = __ffs(intc0_req1);
intc0_req1 &= ~(1 << bit); intc0_req1 &= ~(1 << bit);
do_IRQ(bit); do_IRQ(bit);
} }
...@@ -498,7 +498,7 @@ static void intc1_req0_irqdispatch(void) ...@@ -498,7 +498,7 @@ static void intc1_req0_irqdispatch(void)
if (!intc1_req0) if (!intc1_req0)
return; return;
bit = ffs(intc1_req0); bit = __ffs(intc1_req0);
intc1_req0 &= ~(1 << bit); intc1_req0 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit); do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit);
} }
...@@ -514,7 +514,7 @@ static void intc1_req1_irqdispatch(void) ...@@ -514,7 +514,7 @@ static void intc1_req1_irqdispatch(void)
if (!intc1_req1) if (!intc1_req1)
return; return;
bit = ffs(intc1_req1); bit = __ffs(intc1_req1);
intc1_req1 &= ~(1 << bit); intc1_req1 &= ~(1 << bit);
do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit); do_IRQ(MIPS_CPU_IRQ_BASE + 32 + bit);
} }
......
...@@ -74,7 +74,7 @@ irqreturn_t pb1200_cascade_handler( int irq, void *dev_id) ...@@ -74,7 +74,7 @@ irqreturn_t pb1200_cascade_handler( int irq, void *dev_id)
bcsr->int_status = bisr; bcsr->int_status = bisr;
for( ; bisr; bisr &= (bisr-1) ) for( ; bisr; bisr &= (bisr-1) )
{ {
extirq_nr = PB1200_INT_BEGIN + ffs(bisr); extirq_nr = PB1200_INT_BEGIN + __ffs(bisr);
/* Ack and dispatch IRQ */ /* Ack and dispatch IRQ */
do_IRQ(extirq_nr); do_IRQ(extirq_nr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment