Messages in this thread | | | Date | Fri, 14 Jan 2011 08:46:46 -0600 (CST) | From | Christoph Lameter <> | 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.
| |