diff options
author | David S. Miller <davem@davemloft.net> | 2019-06-07 20:00:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-07 20:00:14 +0200 |
commit | a6cdeeb16bff89c8486324f53577db058cbe81ba (patch) | |
tree | de2d38e10f5768bdf1d2902112a4803d0ae767f3 /arch/sparc/kernel/perf_event.c | |
parent | Merge branch 'Xilinx-axienet-driver-updates' (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-a6cdeeb16bff89c8486324f53577db058cbe81ba.tar.xz linux-a6cdeeb16bff89c8486324f53577db058cbe81ba.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Some ISDN files that got removed in net-next had some changes
done in mainline, take the removals.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 6de7c684c29f..a58ae9c42803 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c @@ -891,6 +891,10 @@ static int sparc_perf_event_set_period(struct perf_event *event, s64 period = hwc->sample_period; int ret = 0; + /* The period may have been changed by PERF_EVENT_IOC_PERIOD */ + if (unlikely(period != hwc->last_period)) + left = period - (hwc->last_period - left); + if (unlikely(left <= -period)) { left = period; local64_set(&hwc->period_left, left); |