Exemple #1
0
void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val)
{
	set_balance_irq_affinity(irq, mask_val);

	/*
	 * Save these away for later use. Re-progam when the
	 * interrupt is pending
	 */
	set_pending_irq(irq, mask_val);
}
Exemple #2
0
/**
 *	irq_set_affinity - Set the irq affinity of a given irq
 *	@irq:		Interrupt to set affinity
 *	@cpumask:	cpumask
 *
 */
int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
{
	struct irq_desc *desc = irq_desc + irq;

	if (!desc->chip->set_affinity)
		return -EINVAL;

	set_balance_irq_affinity(irq, cpumask);

#ifdef CONFIG_GENERIC_PENDING_IRQ
	set_pending_irq(irq, cpumask);
#else
	desc->affinity = cpumask;
	desc->chip->set_affinity(irq, cpumask);
#endif
	return 0;
}