Re: [RFC PATCH] x86: Add safe_udelay() and safe_msleep()

From: Greg KH
Date: Wed Jan 12 2011 - 10:36:03 EST


On Wed, Jan 12, 2011 at 01:32:45PM +1100, Benjamin Herrenschmidt wrote:
> On Tue, 2011-01-11 at 17:06 -0800, Yinghai Lu wrote:
> > We need to use those function in early-quirk stage with code that is shared with
> > later stage.
> >
> > for x86, normal udelay() will need to wait per_cpu(cpu_info) is allocated... that i
> > after smp_prepare_cpus(), because it need to use percpu.loops_per_jiffy.
> >
> > Also msleep() will need to wait schedular is ready.
> >
> > Try to have one early version udelay that use loops_per_jiffy directly.
> > and early msleep is just early delay.
> >
> > This patch will set safe_udelay to early in x86 early arch code, and then init/main.c
> > will set them back.
>
> I still think it's better to just make msleep() work with and without
> scheduler and avoid having to bother with a new API

I agree, this patch just makes things really complicated for no reason.

Again, I still fail to see why you are doing this patch series in the
first place...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/