/* Generic handler for SIH interrupts ... we "know" this is called in task context, with IRQs enabled.  */
static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc)
/* Generic handler for SIH interrupts ... we "know" this is called in task context, with IRQs enabled.  */
static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc)
{
	struct sih_agent *agent = get_irq_data(irq);
	const struct sih *sih = agent->sih;
	int isr;
	local_irq_enable();
	isr = sih_read_isr(sih);
	local_irq_disable();
	if (isr < 0) {
		pr_err("twl4030: %s SIH, read ISR error %d\n",
			sih->name, isr);
		return;
	}
	while (isr) {
		irq = fls(isr);
		irq--;
		isr &= ~BIT(irq);
		if (irq < sih->bits)
			generic_handle_irq(agent->irq_base + irq);
		else
			pr_err("twl4030: %s SIH, invalid ISR bit %d\n",
				sih->name, irq);
	}
}