diff options
| -rw-r--r-- | arch/x86/events/intel/core.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 40e12cfc87f6..daafb893449b 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c | |||
| @@ -3559,6 +3559,14 @@ static void free_excl_cntrs(int cpu) | |||
| 3559 | 3559 | ||
| 3560 | static void intel_pmu_cpu_dying(int cpu) | 3560 | static void intel_pmu_cpu_dying(int cpu) |
| 3561 | { | 3561 | { |
| 3562 | fini_debug_store_on_cpu(cpu); | ||
| 3563 | |||
| 3564 | if (x86_pmu.counter_freezing) | ||
| 3565 | disable_counter_freeze(); | ||
| 3566 | } | ||
| 3567 | |||
| 3568 | static void intel_pmu_cpu_dead(int cpu) | ||
| 3569 | { | ||
| 3562 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); | 3570 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); |
| 3563 | struct intel_shared_regs *pc; | 3571 | struct intel_shared_regs *pc; |
| 3564 | 3572 | ||
| @@ -3570,11 +3578,6 @@ static void intel_pmu_cpu_dying(int cpu) | |||
| 3570 | } | 3578 | } |
| 3571 | 3579 | ||
| 3572 | free_excl_cntrs(cpu); | 3580 | free_excl_cntrs(cpu); |
| 3573 | |||
| 3574 | fini_debug_store_on_cpu(cpu); | ||
| 3575 | |||
| 3576 | if (x86_pmu.counter_freezing) | ||
| 3577 | disable_counter_freeze(); | ||
| 3578 | } | 3581 | } |
| 3579 | 3582 | ||
| 3580 | static void intel_pmu_sched_task(struct perf_event_context *ctx, | 3583 | static void intel_pmu_sched_task(struct perf_event_context *ctx, |
| @@ -3663,6 +3666,7 @@ static __initconst const struct x86_pmu core_pmu = { | |||
| 3663 | .cpu_prepare = intel_pmu_cpu_prepare, | 3666 | .cpu_prepare = intel_pmu_cpu_prepare, |
| 3664 | .cpu_starting = intel_pmu_cpu_starting, | 3667 | .cpu_starting = intel_pmu_cpu_starting, |
| 3665 | .cpu_dying = intel_pmu_cpu_dying, | 3668 | .cpu_dying = intel_pmu_cpu_dying, |
| 3669 | .cpu_dead = intel_pmu_cpu_dead, | ||
| 3666 | }; | 3670 | }; |
| 3667 | 3671 | ||
| 3668 | static struct attribute *intel_pmu_attrs[]; | 3672 | static struct attribute *intel_pmu_attrs[]; |
| @@ -3703,6 +3707,8 @@ static __initconst const struct x86_pmu intel_pmu = { | |||
| 3703 | .cpu_prepare = intel_pmu_cpu_prepare, | 3707 | .cpu_prepare = intel_pmu_cpu_prepare, |
| 3704 | .cpu_starting = intel_pmu_cpu_starting, | 3708 | .cpu_starting = intel_pmu_cpu_starting, |
| 3705 | .cpu_dying = intel_pmu_cpu_dying, | 3709 | .cpu_dying = intel_pmu_cpu_dying, |
| 3710 | .cpu_dead = intel_pmu_cpu_dead, | ||
| 3711 | |||
| 3706 | .guest_get_msrs = intel_guest_get_msrs, | 3712 | .guest_get_msrs = intel_guest_get_msrs, |
| 3707 | .sched_task = intel_pmu_sched_task, | 3713 | .sched_task = intel_pmu_sched_task, |
| 3708 | }; | 3714 | }; |
