[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1101140846340.2423@router.home>
Date: Fri, 14 Jan 2011 08:46:46 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: Yinghai Lu <yinghai@...nel.org>
cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Greg KH <greg@...ah.com>,
Jason Wessel <jason.wessel@...driver.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Tejun Heo <tj@...nel.org>
Subject: Re: [RFC PATCH] x86: Add safe_udelay() and safe_msleep()
On Thu, 13 Jan 2011, Yinghai Lu wrote:
> > Or have a reasonable default for lpj ...
>
> x86 udelay is using percpu cpu_data.loops_per_jiffy, and it is not set yet.
>
> when x86 boot with earlyprintk=dbgp, that early console is loaded quite before setup_percpu_areas()
>
> maybe something like this could workaround it, if cpu_data(0) can be used before setup_percpu_areas().
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index d3cfe26..333694a 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -734,6 +734,7 @@ void __init setup_arch(char **cmdline_p)
>
> early_trap_init();
> early_cpu_init();
> + cpu_data(0).loops_per_jiffy = loops_per_jiffy;
> early_ioremap_init();
>
> setup_olpc_ofw_pgd();
That could work.
--
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