Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cca2a4de authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: add memory barrier after ring operations"

parents 6e798f84 1edf9d02
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ static int add_element(struct mhi_ring *ring, void **rp,
		*assigned_addr = (char *)ring->wp;
	*wp = (void *)(((d_wp + 1) % ring_size) * ring->el_size +
						(uintptr_t)ring->base);

	/* force update visible to other cores */
	smp_wmb();
	return 0;
}

@@ -101,6 +104,9 @@ int delete_element(struct mhi_ring *ring, void **rp,

	*rp = (void *)(((d_rp + 1) % ring_size) * ring->el_size +
						(uintptr_t)ring->base);

	/* force update visible to other cores */
	smp_wmb();
	return 0;
}