/* barrier usage : Since the PVSCSI device is emulated, there could be cases where we may want to serialize some accesses between the driver and the emulation layer. We use compiler barriers instead of the more expensive memory barriers because PVSCSI is only supported on X86 which has strong memory access ordering.  */
static void pvscsi_process_completion_ring(struct pvscsi_adapter *adapter)
/* barrier usage : Since the PVSCSI device is emulated, there could be cases where we may want to serialize some accesses between the driver and the emulation layer. We use compiler barriers instead of the more expensive memory barriers because PVSCSI is only supported on X86 which has strong memory access ordering.  */
static void pvscsi_process_completion_ring(struct pvscsi_adapter *adapter)
{
	struct PVSCSIRingsState *s = adapter->rings_state;
	struct PVSCSIRingCmpDesc *ring = adapter->cmp_ring;
	u32 cmp_entries = s->cmpNumEntriesLog2;
	while (s->cmpConsIdx != s->cmpProdIdx) {
		struct PVSCSIRingCmpDesc *e = ring + (s->cmpConsIdx &
						      MASK(cmp_entries));
		barrier();
		pvscsi_complete_request(adapter, e);
		barrier();
		s->cmpConsIdx++;
	}
}