[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTinSLfEU2D3U1Vkyk8REym=v2X6vWRwvUZ9mgzch@mail.gmail.com>
Date: Sat, 15 Jan 2011 18:32:23 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Tejun Heo <tj@...nel.org>
Cc: Christoph Lameter <cl@...ux.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
Greg KH <greg@...ah.com>,
Jason Wessel <jason.wessel@...driver.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: set percpu cpu0 lpj to default
On Sat, Jan 15, 2011 at 5:09 AM, Tejun Heo <tj@...nel.org> wrote:
> Hello,
>
> It doesn't seem like Christoph's recent patches had anything to do
> with it. The problem is the default loops_per_jiffy has initial value
> of 1 << 12 but the per cpu one used on x86 starts as zero triggering
> warning if delay is used before calibration.
>
> So, all that's necessary is just to initialize it with the same
> constant when defining the per cpu variable like the following. It
> probably would be better to define a named constant for it tho.
>
> Thanks.
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 763df77..1898c70 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -131,7 +131,10 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_map);
> EXPORT_PER_CPU_SYMBOL(cpu_core_map);
>
> /* Per CPU bogomips and other parameters */
> -DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info);
> +DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info) =
> +{
> + .loops_per_jiffy = 1 << 12,
> +};
> EXPORT_PER_CPU_SYMBOL(cpu_info);
>
> atomic_t init_deasserted;
>
yes, it should work.
Thanks
Yinghai
--
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