Skip to content

Commit

Permalink
[MIPS] Alchemy: Get rid of au_ffs().
Browse files Browse the repository at this point in the history
It was plain a bad idea ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
ralfbaechle committed Oct 16, 2007
1 parent 41bd61a commit 56f621c
Showing 4 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion arch/mips/au1000/common/dbdma.c
Original file line number Diff line number Diff line change
@@ -859,7 +859,7 @@ dbdma_interrupt(int irq, void *dev_id)

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

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

irq = au_ffs(intc0_req1) - 1;
irq = ffs(intc0_req1);
intc0_req1 &= ~(1 << irq);
do_IRQ(irq);
}
@@ -517,7 +517,7 @@ static void intc1_req0_irqdispatch(void)
if (!intc1_req0)
return;

irq = au_ffs(intc1_req0) - 1;
irq = ffs(intc1_req0);
intc1_req0 &= ~(1 << irq);
irq += 32;
do_IRQ(irq);
@@ -534,7 +534,7 @@ static void intc1_req1_irqdispatch(void)
if (!intc1_req1)
return;

irq = au_ffs(intc1_req1) - 1;
irq = ffs(intc1_req1);
intc1_req1 &= ~(1 << irq);
irq += 32;
do_IRQ(irq);
2 changes: 1 addition & 1 deletion arch/mips/au1000/pb1200/irqmap.c
Original file line number Diff line number Diff line change
@@ -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-1) + au_ffs(bisr);
extirq_nr = PB1200_INT_BEGIN + au_ffs(bisr);
/* Ack and dispatch IRQ */
do_IRQ(extirq_nr);
}
10 changes: 0 additions & 10 deletions include/asm-mips/mach-au1x00/au1000.h
Original file line number Diff line number Diff line change
@@ -98,16 +98,6 @@ static __inline__ int au_ffz(unsigned int x)
return __ilog2(x & -x);
}

/*
* ffs: find first bit set. This is defined the same way as
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
static __inline__ int au_ffs(int x)
{
return __ilog2(x & -x) + 1;
}

/* arch/mips/au1000/common/clocks.c */
extern void set_au1x00_speed(unsigned int new_freq);
extern unsigned int get_au1x00_speed(void);

0 comments on commit 56f621c

Please sign in to comment.