From patchwork Thu Mar 21 12:21:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15466 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9948B23E00 for ; Thu, 21 Mar 2013 12:21:44 +0000 (UTC) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fiordland.canonical.com (Postfix) with ESMTP id 46B5FA18527 for ; Thu, 21 Mar 2013 12:21:44 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id b13so1853921vby.33 for ; Thu, 21 Mar 2013 05:21:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=3/6DvYQRf+BIZCfecS7SoMareLJsMEWMCSelXtyoO6o=; b=moH+Fiqd8oAUHBvnBHJcfw7FhpAhKmZVCcyMlyalHeHzNHeTYe5vwrzVjqQx+BnivF xNJgWkUDfOEaY2bt4FImNzdEiKtG3jFpt9vzVNPJsOcUFuhPdEG+/rIoKaFrNQnWz7du kiWx70GuD8UkhFkUwFxlFxkrBZ3l4QutAi4nDZi2TxnEDP6O31SkPq+bNL8/YX3LPRxa Xv2QdF3+sVMbYgVYyhN0/pdSUMt1aQ8y0SeQSKAd7Dm+JpmTNyylmk8iYkcB6cF7iV9s ECXCMBmSZ+he/IABogplaomDlnYktaWlaG/ual0Yxb2P7TTbQzYcHL6UKdTKeonO1PqZ Q8rw== X-Received: by 10.58.207.163 with SMTP id lx3mr1861078vec.35.1363868503764; Thu, 21 Mar 2013 05:21:43 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.233.198 with SMTP id ty6csp57794vec; Thu, 21 Mar 2013 05:21:43 -0700 (PDT) X-Received: by 10.194.123.103 with SMTP id lz7mr16862141wjb.10.1363868502873; Thu, 21 Mar 2013 05:21:42 -0700 (PDT) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mx.google.com with ESMTPS id x19si2346504wjw.4.2013.03.21.05.21.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:42 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.44 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.44 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) smtp.mail=daniel.lezcano@linaro.org Received: by mail-wg0-f44.google.com with SMTP id dr12so2139828wgb.23 for ; Thu, 21 Mar 2013 05:21:42 -0700 (PDT) X-Received: by 10.194.109.136 with SMTP id hs8mr16957567wjb.8.1363868502424; Thu, 21 Mar 2013 05:21:42 -0700 (PDT) Received: from mai.home (AToulouse-654-1-426-131.w2-6.abo.wanadoo.fr. [2.6.209.131]) by mx.google.com with ESMTPS id o8sm4333193wix.7.2013.03.21.05.21.38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:40 -0700 (PDT) From: Daniel Lezcano To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, patches@linaro.org, lenb@kernel.org, linus.walleij@linaro.org, santosh.shilimkar@ti.com, rnayak@ti.com, kernel@pengutronix.de, tglx@linutronix.de Subject: [PATCH 3/4] cpuidle / imx6 : use CPUIDLE_FLAG_TIMER_STOP flag Date: Thu, 21 Mar 2013 13:21:33 +0100 Message-Id: <1363868494-5503-3-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1363868494-5503-1-git-send-email-daniel.lezcano@linaro.org> References: <1363868494-5503-1-git-send-email-daniel.lezcano@linaro.org> X-Gm-Message-State: ALoCoQk5GatkJX40FCynrIsb6iA5LtX8ugvk/2DDhPPUhibp2+IXydAK5nXpofLsacib/GFC1y4O Use the CPUIDLE_FLAG_TIMER_STOP and let the cpuidle framework to handle the CLOCK_EVT_NOTIFY_BROADCAST_ENTER/EXIT when entering this state. Signed-off-by: Daniel Lezcano Cc: Len Brown Cc: Linus Walleij Cc: Santosh Shilimkar Cc: Rajendra Nayak Cc: Sascha Hauer Cc: Thomas Gleixner Acked-by: Santosh Shilimkar --- arch/arm/mach-imx/cpuidle-imx6q.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index d533e26..5ae22f7 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -21,10 +21,6 @@ static DEFINE_SPINLOCK(master_lock); static int imx6q_enter_wait(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { - int cpu = dev->cpu; - - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu); - if (atomic_inc_return(&master) == num_online_cpus()) { /* * With this lock, we prevent other cpu to exit and enter @@ -43,7 +39,6 @@ idle: cpu_do_idle(); done: atomic_dec(&master); - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu); return index; } @@ -70,7 +65,8 @@ static struct cpuidle_driver imx6q_cpuidle_driver = { { .exit_latency = 50, .target_residency = 75, - .flags = CPUIDLE_FLAG_TIME_VALID, + .flags = CPUIDLE_FLAG_TIME_VALID | + CPUIDLE_FLAG_TIMER_STOP, .enter = imx6q_enter_wait, .name = "WAIT", .desc = "Clock off",