Skip to content

Commit d058c7d

Browse files
Kan LiangPeter Zijlstra
authored andcommitted
perf/x86/amd: Remove driver-specific throttle support
The throttle support has been added in the generic code. Remove the driver-specific throttle support. Besides the throttle, perf_event_overflow may return true because of event_limit. It already does an inatomic event disable. The pmu->stop is not required either. Signed-off-by: Kan Liang <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Ravi Bangoria <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b8328f6 commit d058c7d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

arch/x86/events/amd/core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,8 +1003,7 @@ static int amd_pmu_v2_handle_irq(struct pt_regs *regs)
10031003

10041004
perf_sample_save_brstack(&data, event, &cpuc->lbr_stack, NULL);
10051005

1006-
if (perf_event_overflow(event, &data, regs))
1007-
x86_pmu_stop(event, 0);
1006+
perf_event_overflow(event, &data, regs);
10081007
}
10091008

10101009
/*

arch/x86/events/amd/ibs.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,9 +1373,7 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
13731373
hwc->sample_period = perf_ibs->min_period;
13741374

13751375
out:
1376-
if (throttle) {
1377-
perf_ibs_stop(event, 0);
1378-
} else {
1376+
if (!throttle) {
13791377
if (perf_ibs == &perf_ibs_op) {
13801378
if (ibs_caps & IBS_CAPS_OPCNTEXT) {
13811379
new_config = period & IBS_OP_MAX_CNT_EXT_MASK;

0 commit comments

Comments
 (0)