perf/core: Remove wrong barrier
authorPeter Zijlstra <peterz@infradead.org>
Tue, 5 Sep 2017 12:17:58 +0000 (14:17 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 27 Oct 2017 08:31:58 +0000 (10:31 +0200)
The barrier and comment make no sense:

 - if what the barrier says is true, it should be wmb() but that
   should then be part of the arch driver, not the generic code.

 - if it is an SMP barrier, there must be a matching barrier, and
   there isn't one.

So kill it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c

index 6322e245176c57a820414ce9c3804423b227f114..205a4321f6787b5315017dc1ab0af5839759ba6e 100644 (file)
@@ -2097,11 +2097,6 @@ event_sched_in(struct perf_event *event,
                event->hw.interrupts = 0;
        }
 
-       /*
-        * The new state must be visible before we turn it on in the hardware:
-        */
-       smp_wmb();
-
        perf_pmu_disable(event->pmu);
 
        perf_set_shadow_time(event, ctx, tstamp);