From: Mike Travis <travis@sgi.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: rusty@rustcorp.com.au, torvalds@linux-foundation.org,
linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 2/2] cpumask fallout: Initialize irq_default_affinity earlier (v2).
Date: Thu, 08 Jan 2009 15:11:20 -0800 [thread overview]
Message-ID: <49668818.1060900@sgi.com> (raw)
In-Reply-To: <1231455345-29453-2-git-send-email-ddaney@caviumnetworks.com>
It's essentially the same as I tested on x86_64 so you can add my
Acked-by: Mike Travis <travis@sgi.com>
Thanks!
Mike
David Daney wrote:
> Move the initialization of irq_default_affinity to early_irq_init as
> core_initcall is too late.
>
> irq_default_affinity can be used in init_IRQ and potentially timer and
> SMP init as well. All of these happen before core_initcall. Moving
> the initialization to early_irq_init ensures that it is initialized
> before it is used.
>
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
> ---
> kernel/irq/handle.c | 12 ++++++++++++
> kernel/irq/manage.c | 8 --------
> 2 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
> index c20db0b..a9fbb01 100644
> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
> @@ -39,6 +39,14 @@ void handle_bad_irq(unsigned int irq, struct irq_desc *desc)
> ack_bad_irq(irq);
> }
>
> +static inline void __init init_irq_default_affinity(void)
> +{
> +#if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
> + alloc_bootmem_cpumask_var(&irq_default_affinity);
> + cpumask_setall(irq_default_affinity);
> +#endif
> +}
> +
> /*
> * Linux has a controller-independent interrupt architecture.
> * Every controller has a 'controller-template', that is used
> @@ -134,6 +142,8 @@ int __init early_irq_init(void)
> int legacy_count;
> int i;
>
> + init_irq_default_affinity();
> +
> desc = irq_desc_legacy;
> legacy_count = ARRAY_SIZE(irq_desc_legacy);
>
> @@ -219,6 +229,8 @@ int __init early_irq_init(void)
> int count;
> int i;
>
> + init_irq_default_affinity();
> +
> desc = irq_desc;
> count = ARRAY_SIZE(irq_desc);
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 618a64f..291f036 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -18,14 +18,6 @@
> #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS)
> cpumask_var_t irq_default_affinity;
>
> -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);
> -
> /**
> * synchronize_irq - wait for pending IRQ handlers (on other CPUs)
> * @irq: interrupt number to wait for
prev parent reply other threads:[~2009-01-08 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 22:53 [PATCH 0/2] cpumask fallout: Initialize irq_default_affinity earlier et al David Daney
2009-01-08 22:55 ` [PATCH 1/2] Make irq_*_affinity depend on CONFIG_GENERIC_HARDIRQS too David Daney
2009-01-08 22:55 ` [PATCH 2/2] cpumask fallout: Initialize irq_default_affinity earlier (v2) David Daney
2009-01-08 23:04 ` Ihar Hrachyshka
2009-01-08 23:11 ` Mike Travis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49668818.1060900@sgi.com \
--to=travis@sgi.com \
--cc=ddaney@caviumnetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox