/* * IRQ chip definitions for INTC IRQs. * * Copyright (C) 2007, 2008 Magnus Damm * Copyright (C) 2009 - 2012 Paul Mundt * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details.
*/ #include <linux/cpumask.h> #include <linux/bsearch.h> #include <linux/io.h> #include"internals.h"
for (cpu = 0; cpu < SMP_NR(d, _INTC_ADDR_D(handle)); cpu++) { #ifdef CONFIG_SMP if (!cpumask_test_cpu(cpu, irq_data_get_affinity_mask(data))) continue; #endif
addr = INTC_REG(d, _INTC_ADDR_D(handle), cpu);
intc_disable_fns[_INTC_MODE(handle)](addr, handle,intc_reg_fns\
[_INTC_FN(handle)], irq);
}
}
#ifdef CONFIG_SMP /* * This is held with the irq desc lock held, so we don't require any * additional locking here at the intc desc level. The affinity mask is * later tested in the enable/disable paths.
*/ staticint intc_set_affinity(struct irq_data *data, conststruct cpumask *cpumask, bool force)
{ if (!cpumask_intersects(cpumask, cpu_online_mask)) return -1;
if (!intc_get_prio_level(irq) || prio <= 1) return -EINVAL;
ihp = intc_find_irq(d->prio, d->nr_prio, irq); if (ihp) { if (prio >= (1 << _INTC_WIDTH(ihp->handle))) return -EINVAL;
intc_set_prio_level(irq, prio);
/* * only set secondary masking method directly * primary masking method is using intc_prio_level[irq] * priority level will be set during next enable()
*/ if (_INTC_FN(ihp->handle) != REG_FN_ERR)
_intc_enable(data, ihp->handle);
} return 0;
}
ihp = intc_find_irq(d->sense, d->nr_sense, irq); if (ihp) { /* PINT has 2-bit sense registers, should fail on EDGE_BOTH */ if (value >= (1 << _INTC_WIDTH(ihp->handle))) return -EINVAL;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.