diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-29 16:44:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-29 16:44:40 +0100 |
commit | e64de3b96c1ba3c1de236a4a103ec21234a5849f (patch) | |
tree | b4ed91858a3d353bd72e3be101433ac821759379 /arch/arm/kernel/perf_event.c | |
parent | w1/ds2482: use module_i2c_driver to simplify the code (diff) | |
parent | Linux 3.7-rc3 (diff) | |
download | linux-e64de3b96c1ba3c1de236a4a103ec21234a5849f.tar.xz linux-e64de3b96c1ba3c1de236a4a103ec21234a5849f.zip |
Merge 3.7-rc3 into char-misc-next
This brings in the various 3.7-rc3 char fixes into char-misc-next.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/kernel/perf_event.c')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 93971b1a4f0b..53c0304b734a 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -96,6 +96,10 @@ armpmu_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); |