• Peter Zijlstra's avatar
    perf/x86/intel: Remove intel_excl_states::init_state · 43ef205b
    Peter Zijlstra authored
    For some obscure reason intel_{start,stop}_scheduling() copy the HT
    state to an intermediate array. This would make sense if we ever were
    to make changes to it which we'd have to discard.
    
    Except we don't. By the time we call intel_commit_scheduling() we're;
    as the name implies; committed to them. We'll never back out.
    
    A further hint its pointless is that stop_scheduling() unconditionally
    publishes the state.
    
    So the intermediate array is pointless, modify the state in place and
    kill the extra array.
    
    And remove the pointless array initialization: INTEL_EXCL_UNUSED == 0.
    
    Note; all is serialized by intel_excl_cntr::lock.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    43ef205b
perf_event.h 24.8 KB