Message ID | 1431530484-3389-1-git-send-email-pawel.moll@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wednesday 13 May 2015 16:21:24 Pawel Moll wrote: > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > index df5f307..7d9879e 100644 > --- a/drivers/bus/arm-ccn.c > +++ b/drivers/bus/arm-ccn.c > @@ -921,9 +921,8 @@ static void arm_ccn_pmu_event_start(struct perf_event *event, int flags) > * attribute). > */ > if (!ccn->irq) > - __hrtimer_start_range_ns(&ccn->dt.hrtimer, > - arm_ccn_pmu_timer_period(), 0, > - HRTIMER_MODE_REL_PINNED, 0); > + hrtimer_start(&ccn->dt.hrtimer, arm_ccn_pmu_timer_period(), > + HRTIMER_MODE_REL_PINNED); > > /* Set the DT bus input, engaging the counter */ > arm_ccn_pmu_xp_dt_config(event, 1); Is this correct by itself, or do we need to pull in the branch that contains c6eb3f70d44828 ("hrtimer: Get rid of hrtimer softirq") from Thomas? The other similar patches that Thomas did contain a comment about the conversion being safe after hrtimer_start() no longer uses a softirq, but it is still in use in 4.1-rc3. Arnd
On Wed, 2015-05-13 at 16:32 +0100, Arnd Bergmann wrote: > On Wednesday 13 May 2015 16:21:24 Pawel Moll wrote: > > diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c > > index df5f307..7d9879e 100644 > > --- a/drivers/bus/arm-ccn.c > > +++ b/drivers/bus/arm-ccn.c > > @@ -921,9 +921,8 @@ static void arm_ccn_pmu_event_start(struct perf_event *event, int flags) > > * attribute). > > */ > > if (!ccn->irq) > > - __hrtimer_start_range_ns(&ccn->dt.hrtimer, > > - arm_ccn_pmu_timer_period(), 0, > > - HRTIMER_MODE_REL_PINNED, 0); > > + hrtimer_start(&ccn->dt.hrtimer, arm_ccn_pmu_timer_period(), > > + HRTIMER_MODE_REL_PINNED); > > > > /* Set the DT bus input, engaging the counter */ > > arm_ccn_pmu_xp_dt_config(event, 1); > > Is this correct by itself, or do we need to pull in the branch that > contains c6eb3f70d44828 ("hrtimer: Get rid of hrtimer softirq") > from Thomas? The other similar patches that Thomas did contain a > comment about the conversion being safe after hrtimer_start() > no longer uses a softirq, but it is still in use in 4.1-rc3. That's why I asked who should carry this patch ;-) Now, the answer to your question is: the result will not be worse than the what was there before you pulled my updates, as the code was using normal hrtimer_start(). It's just when I realised that it should be pinned I looked at what x86 uncore pmu is doing and shamelessly (and probably a bit mindlessly) copied the "do not wakeup" version from there. Pawel
diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index df5f307..7d9879e 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -921,9 +921,8 @@ static void arm_ccn_pmu_event_start(struct perf_event *event, int flags) * attribute). */ if (!ccn->irq) - __hrtimer_start_range_ns(&ccn->dt.hrtimer, - arm_ccn_pmu_timer_period(), 0, - HRTIMER_MODE_REL_PINNED, 0); + hrtimer_start(&ccn->dt.hrtimer, arm_ccn_pmu_timer_period(), + HRTIMER_MODE_REL_PINNED); /* Set the DT bus input, engaging the counter */ arm_ccn_pmu_xp_dt_config(event, 1);
hrtimer_start() does not longer defer already expired timers to the softirq. Get rid of the __hrtimer_start_range_ns() invocation. Reported-by: Mark Brown <mark.brown@arm.com> Signed-off-by: Pawel Moll <pawel.moll@arm.com> --- Arnd, Olof, Kevin, This patch solves the linux-next build issue reported by Mark Brown: http://article.gmane.org/gmane.linux.kernel.next/35377 and is an equivalent of the following change: http://marc.info/?l=linux-kernel&m=142904610220085 Could you, please, queue it? Thanks! drivers/bus/arm-ccn.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)