On 21/09/2016 18:05, Emilio G. Cota wrote: >> > + tb_lock(); >> > + >> > + /* If it's already been done on request of another CPU, >> > + * just retry. >> > + */ >> > + if (atomic_read(&tcg_ctx.tb_ctx.tb_flush_count) != tb_flush_req) { >> > + goto done; > tb_flush_count is always accessed with tb_lock held, right? If so, I don't > see a reason to access it with atomic_read/set.
tb_flush accesses it outside tb_lock. Technically this one you're quoting need not use atomic_read, but others need to. >> + cpu_fprintf(f, "TB flush count %d\n", >> + atomic_read(&tcg_ctx.tb_ctx.tb_flush_count)); > > s/%d/%u/ would be more appropriate given the type change. Ok. Paolo