提交 9f44f9a2 编写于 作者: W Will Deacon

ARM: perf: remove mysterious compiler barrier

There's a rather strange compiler barrier in the PMU disabling code
which was presumably placed there by aliens. There's no valid reason for
the barrier and one can only suspect that it's up to no good.

This patch removes it before it has a chance to spread.
Signed-off-by: NWill Deacon <will.deacon@arm.com>
上级 df3d17e0
...@@ -223,7 +223,6 @@ armpmu_stop(struct perf_event *event, int flags) ...@@ -223,7 +223,6 @@ armpmu_stop(struct perf_event *event, int flags)
*/ */
if (!(hwc->state & PERF_HES_STOPPED)) { if (!(hwc->state & PERF_HES_STOPPED)) {
armpmu->disable(hwc, hwc->idx); armpmu->disable(hwc, hwc->idx);
barrier(); /* why? */
armpmu_event_update(event, hwc, hwc->idx); armpmu_event_update(event, hwc, hwc->idx);
hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册