On 04.02.20 14:27, Thomas Huth wrote: >> +/* >> + * Low level uv_call that takes r1 and r2 as parameter and avoids >> + * stalls for long running busy conditions by doing schedule >> + */ >> +static inline int uv_call_sched(unsigned long r1, unsigned long r2) >> +{ >> + int cc = 3; >> + >> + while (cc > 1) { >> + asm volatile( >> + "0: .insn rrf,0xB9A40000,%[r1],%[r2],0,0\n" >> + " ipm %[cc]\n" >> + " srl %[cc],28\n" >> + : [cc] "=d" (cc) >> + : [r1] "a" (r1), [r2] "a" (r2) > > You could use "d" instead of "a" for both, r1 and r2, here. Indeed. Fixed. > >> + : "memory", "cc"); >> + if (need_resched()) >> + schedule(); >> + } > > It's a matter of taste, but I'd rather do: > > int cc; > do { > ... > } while (cc > 1); > > (i.e. no need to pre-initialize cc with 3) Yes, I like that better. > >> + return cc; >> +} > > Thomas >