From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753539AbbDCIXd (ORCPT ); Fri, 3 Apr 2015 04:23:33 -0400 Received: from terminus.zytor.com ([198.137.202.10]:44888 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752420AbbDCIXa (ORCPT ); Fri, 3 Apr 2015 04:23:30 -0400 Date: Fri, 3 Apr 2015 01:23:01 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, daniel.lezcano@linaro.org, rafael.j.wysocki@intel.com, peterz@infradead.org Reply-To: tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, daniel.lezcano@linaro.org, peterz@infradead.org, rafael.j.wysocki@intel.com In-Reply-To: <2106401.cYdJzzA6Ic@vostro.rjw.lan> References: <2106401.cYdJzzA6Ic@vostro.rjw.lan> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] cpuidle: Use explicit broadcast control function Git-Commit-ID: ee7a1438b548fb5e206058d6bd0e2a5adf081dbf X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ee7a1438b548fb5e206058d6bd0e2a5adf081dbf Gitweb: http://git.kernel.org/tip/ee7a1438b548fb5e206058d6bd0e2a5adf081dbf Author: Thomas Gleixner AuthorDate: Fri, 3 Apr 2015 02:02:18 +0200 Committer: Ingo Molnar CommitDate: Fri, 3 Apr 2015 08:44:32 +0200 cpuidle: Use explicit broadcast control function Replace the clockevents_notify() call with an explicit function call. Signed-off-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki Cc: Daniel Lezcano Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/2106401.cYdJzzA6Ic@vostro.rjw.lan Signed-off-by: Ingo Molnar --- drivers/cpuidle/driver.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 2697e87..5db1478 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "cpuidle.h" @@ -130,21 +130,20 @@ static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv) #endif /** - * cpuidle_setup_broadcast_timer - enable/disable the broadcast timer + * cpuidle_setup_broadcast_timer - enable/disable the broadcast timer on a cpu * @arg: a void pointer used to match the SMP cross call API * - * @arg is used as a value of type 'long' with one of the two values: - * - CLOCK_EVT_NOTIFY_BROADCAST_ON - * - CLOCK_EVT_NOTIFY_BROADCAST_OFF + * If @arg is NULL broadcast is disabled otherwise enabled * - * Set the broadcast timer notification for the current CPU. This function - * is executed per CPU by an SMP cross call. It not supposed to be called - * directly. + * This function is executed per CPU by an SMP cross call. It's not + * supposed to be called directly. */ static void cpuidle_setup_broadcast_timer(void *arg) { - int cpu = smp_processor_id(); - clockevents_notify((long)(arg), &cpu); + if (arg) + tick_broadcast_enable(); + else + tick_broadcast_disable(); } /** @@ -239,7 +238,7 @@ static int __cpuidle_register_driver(struct cpuidle_driver *drv) if (drv->bctimer) on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, - (void *)CLOCK_EVT_NOTIFY_BROADCAST_ON, 1); + (void *)1, 1); poll_idle_init(drv); @@ -263,7 +262,7 @@ static void __cpuidle_unregister_driver(struct cpuidle_driver *drv) if (drv->bctimer) { drv->bctimer = 0; on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer, - (void *)CLOCK_EVT_NOTIFY_BROADCAST_OFF, 1); + NULL, 1); } __cpuidle_unset_driver(drv);