[Skiboot] [PATCH 1/2] Change load_resource() API to be all about preloading.

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Mar 24 19:52:32 AEDT 2015


On Tue, 2015-03-24 at 18:23 +1100, Stewart Smith wrote:
> >
> >> +
> >> +int wait_for_resource_loaded(enum resource_id id, uint32_t idx)
> >> +{
> >> +    int r = resource_loaded(id, idx);
> >> +
> >> +    while(r == OPAL_BUSY) {
> >> +            opal_run_pollers();
> >> +            time_wait_nopoll(msecs_to_tb(5));
> >
> > time_wait_ms_nopoll(5);
> >
> >> +            cpu_relax();
> >
> > time_wait calls cpu_relax while it loops.

Why open code opal_run_pollers + time_wait_nopoll + cpu_relax and not
just call time_wait() ?

Cheers,
Ben.




More information about the Skiboot mailing list