Re: [RFC] Genirq and CPU isolation

From: Randy Dunlap
Date: Sun Feb 24 2008 - 20:48:11 EST


On Fri, 22 Feb 2008 22:19:18 -0800 Max Krasnyansky wrote:

Hi Max,

> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 438a014..e74db94 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -488,6 +491,26 @@ void free_irq(unsigned int irq, void *dev_id)
> }
> EXPORT_SYMBOL(free_irq);
>
> +#ifndef CONFIG_AUTO_IRQ_AFFINITY
> +/**
> + * Generic version of the affinity autoselector.
> + * Called under desc->lock from setup_irq().
> + * btw Should we rename this to select_irq_affinity() ?
> + */

Please don't begin comment blocks with "/**" unless they are in
kernel-doc format. (See Documentation/kernel-doc-nano-HOWTO.txt
for details of it.)

> +int select_smp_affinity(unsigned int irq)
> +{
> + cpumask_t usable_cpus;
> +
> + if (!irq_can_set_affinity(irq))
> + return 0;
> +
> + cpus_andnot(usable_cpus, cpu_online_map, cpu_isolated_map);
> + irq_desc[irq].affinity = usable_cpus;
> + irq_desc[irq].chip->set_affinity(irq, usable_cpus);
> + return 0;
> +}
> +#endif
> +
> /**
> * request_irq - allocate an interrupt line
> * @irq: Interrupt line to allocate

This one is in kernel-doc format.

---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/