lkml.org 
[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PULL] cpumask tree
Rusty Russell wrote:
> commit d036e67b40f52bdd95392390108defbac7e53837
> Author: Rusty Russell <rusty@rustcorp.com.au>
> Date: Thu Jan 1 10:12:26 2009 +1030
>
> cpumask: convert kernel/irq
>
> Impact: Reduce stack usage, use new cpumask API. ALPHA mod!
>
> Main change is that irq_default_affinity becomes a cpumask_var_t, so
> treat it as a pointer (this effects alpha).
>
> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>

Which contains:

> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 61c4a9b..cd0cd8d 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -16,8 +16,15 @@
> #include "internals.h"
>
> #ifdef CONFIG_SMP
> +cpumask_var_t irq_default_affinity;
>
> -cpumask_t irq_default_affinity = CPU_MASK_ALL;
> +static int init_irq_default_affinity(void)
> +{
> + alloc_cpumask_var(&irq_default_affinity, GFP_KERNEL);
> + cpumask_setall(irq_default_affinity);
> + return 0;
> +}
> +core_initcall(init_irq_default_affinity);

I think core_initcall is too late to be initializing
irq_default_affinity. This happens way after init_IRQ() is called and
for my target (mips/cavium_octeon) after the timer and SMP related irqs
are setup.

I had been setting irq_default_affinity in init_IRQ(), and I could
probably do it later with no real problem, but this seems wrong to me.
Data that is potentially used in interrupt configuration and processing
should be initialized before it is used.

David Daney


\
 
 \ /
  Last update: 2009-01-08 20:13    [W:0.023 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site