static void intc_enable_disable(struct intc_desc_int *d, unsigned long handle, int do_enable) { unsigned long addr; unsigned int cpu; unsigned long (*fn)(unsigned long, unsigned long, unsigned long (*)(unsigned long, unsigned long, unsigned long), unsigned int); if (do_enable) { for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_E(handle)); cpu++) { addr = INTC_REG(d, _INTC_ADDR_E(handle), cpu); fn = intc_enable_noprio_fns[_INTC_MODE(handle)]; fn(addr, handle, intc_reg_fns[_INTC_FN(handle)], 0); } } else { for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_D(handle)); cpu++) { addr = INTC_REG(d, _INTC_ADDR_D(handle), cpu); fn = intc_disable_fns[_INTC_MODE(handle)]; fn(addr, handle, intc_reg_fns[_INTC_FN(handle)], 0); } } }
void _intc_enable(struct irq_data *data, unsigned long handle) { unsigned int irq = data->irq; struct intc_desc_int *d = get_intc_desc(irq); unsigned long addr; unsigned int cpu; for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_E(handle)); cpu++) { #ifdef CONFIG_SMP if (!cpumask_test_cpu(cpu, data->affinity)) continue; #endif addr = INTC_REG(d, _INTC_ADDR_E(handle), cpu); intc_enable_fns[_INTC_MODE(handle)](addr, handle, intc_reg_fns\ [_INTC_FN(handle)], irq); } intc_balancing_enable(irq); }