Skip to content
Snippets Groups Projects
Commit 82631f5d authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Benjamin Herrenschmidt
Browse files

powerpc: Add write barrier before enabling DTL flags


Currently, we don't enforce any ordering for updates to the lppaca
when enabling dtl logging, so we may end up enabling logging before the
index fields have been established.

This change adds a smp_wmb() before doing the actual enable.

Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 757c74d2
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,10 @@ static int dtl_enable(struct dtl *dtl)
/* set our initial buffer indices */
dtl->last_idx = lppaca[dtl->cpu].dtl_idx = 0;
/* ensure that our updates to the lppaca fields have occurred before
* we actually enable the logging */
smp_wmb();
/* enable event logging */
lppaca[dtl->cpu].dtl_enable_mask = dtl_event_mask;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment