diff options
Diffstat (limited to 'arch/x86/events/intel/knc.c')
-rw-r--r-- | arch/x86/events/intel/knc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/events/intel/knc.c b/arch/x86/events/intel/knc.c index 206226e08f49..548d5f774b07 100644 --- a/arch/x86/events/intel/knc.c +++ b/arch/x86/events/intel/knc.c @@ -263,7 +263,9 @@ again: goto again; done: - knc_pmu_enable_all(0); + /* Only restore PMU state when it's active. See x86_pmu_disable(). */ + if (cpuc->enabled) + knc_pmu_enable_all(0); return handled; } |