[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49664F9B.8070703@caviumnetworks.com>
Date: Thu, 08 Jan 2009 11:10:19 -0800
From: David Daney <ddaney@...iumnetworks.com>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Mike Travis <travis@....com>, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org
Subject: Re: [PULL] cpumask tree
Rusty Russell wrote:
> commit d036e67b40f52bdd95392390108defbac7e53837
> Author: Rusty Russell <rusty@...tcorp.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@...tcorp.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists