On Mon, 2017-07-24 at 14:29 +1000, David Gibson wrote: > > + case XIVE_ESB_SET_PQ_00: > > + case XIVE_ESB_SET_PQ_01: > > + case XIVE_ESB_SET_PQ_10: > > + case XIVE_ESB_SET_PQ_11: > > + ret = xive_pq_get(x, lisn); > > + xive_pq_set(x, lisn, (offset >> 8) & 0x3); > > Again I'd prefer xive_pq_set() return the old value itself, for more > obvious atomicity.
Agreed. That will also help with StoreEOI (store to 0x400 of the EOI page) which does an EOI then re-sends an interrupt if the old value was 11 (while the load EOI doesn't resend). Cheers, Ben.