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

Stewart Smith stewart at linux.vnet.ibm.com
Wed Mar 25 11:06:57 AEDT 2015


Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> 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() ?

time_wait() will not call pollers if lock is held, and I think I'd
prefer to get the warning here.



More information about the Skiboot mailing list