提交 82631f5d 编写于 作者: J Jeremy Kerr 提交者: Benjamin Herrenschmidt

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: NJeremy Kerr <jk@ozlabs.org>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 757c74d2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册