mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 21:40:53 +07:00
mfd: Micro-optimization on twl4030 IRQ handler
__ffs() will be far faster than the for loop used. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
f01b1f90bf
commit
5a903090e7
@ -293,7 +293,6 @@ static unsigned twl4030_irq_base;
|
|||||||
*/
|
*/
|
||||||
static irqreturn_t handle_twl4030_pih(int irq, void *devid)
|
static irqreturn_t handle_twl4030_pih(int irq, void *devid)
|
||||||
{
|
{
|
||||||
int module_irq;
|
|
||||||
irqreturn_t ret;
|
irqreturn_t ret;
|
||||||
u8 pih_isr;
|
u8 pih_isr;
|
||||||
|
|
||||||
@ -304,12 +303,13 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid)
|
|||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* these handlers deal with the relevant SIH irq status */
|
while (pih_isr) {
|
||||||
for (module_irq = twl4030_irq_base;
|
unsigned long pending = __ffs(pih_isr);
|
||||||
pih_isr;
|
unsigned int irq;
|
||||||
pih_isr >>= 1, module_irq++) {
|
|
||||||
if (pih_isr & 0x1)
|
pih_isr &= ~BIT(pending);
|
||||||
handle_nested_irq(module_irq);
|
irq = pending + twl4030_irq_base;
|
||||||
|
handle_nested_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
Loading…
Reference in New Issue
Block a user