diff mbox

[16/16] hrtimer: use base->hres_active directly instead of hrtimer_hres_active()

Message ID c2108011e02e39d0be889be658046e0de44f7c79.1396006658.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar March 28, 2014, 11:41 a.m. UTC
use base->hres_active directly when we already have a pointer to base instead of
calling hrtimer_hres_active(). As that would lead to:

	__this_cpu_read(hrtimer_bases.hres_active)

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 kernel/hrtimer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Viresh Kumar March 28, 2014, 12:24 p.m. UTC | #1
On 28 March 2014 17:11, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> @@ -1107,7 +1107,7 @@ ktime_t hrtimer_get_next_event(void)
>
>         raw_spin_lock_irqsave(&cpu_base->lock, flags);
>
> -       if (!hrtimer_hres_active()) {
> +       if (!cpu_base->hres_active) {
>                 for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++, base++) {
>                         struct hrtimer *timer;
>                         struct timerqueue_node *next;
> @@ -1437,7 +1437,7 @@ void hrtimer_run_queues(void)
>         struct hrtimer_clock_base *base;
>         int index, gettime = 1;
>
> -       if (hrtimer_hres_active())
> +       if (cpu_base->hres_active)
>                 return;
>
>         for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {

These two changes are broken.. Would remove these and resend..
My tree is fixed though..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 83e5f2d..f379821 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -883,7 +883,7 @@  static void __remove_hrtimer(struct hrtimer *timer, unsigned long newstate,
 
 #ifdef CONFIG_HIGH_RES_TIMERS
 	/* Reprogram the clock event device. if enabled */
-	if (reprogram && hrtimer_hres_active() &&
+	if (reprogram && base->cpu_base->hres_active &&
 	    &timer->node == timerqueue_getnext(&base->active)) {
 		ktime_t expires;
 
@@ -1107,7 +1107,7 @@  ktime_t hrtimer_get_next_event(void)
 
 	raw_spin_lock_irqsave(&cpu_base->lock, flags);
 
-	if (!hrtimer_hres_active()) {
+	if (!cpu_base->hres_active) {
 		for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++, base++) {
 			struct hrtimer *timer;
 			struct timerqueue_node *next;
@@ -1437,7 +1437,7 @@  void hrtimer_run_queues(void)
 	struct hrtimer_clock_base *base;
 	int index, gettime = 1;
 
-	if (hrtimer_hres_active())
+	if (cpu_base->hres_active)
 		return;
 
 	for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {