From patchwork Thu Mar 21 12:21:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15465 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 02FA123E00 for ; Thu, 21 Mar 2013 12:21:41 +0000 (UTC) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by fiordland.canonical.com (Postfix) with ESMTP id 8BA07A1878A for ; Thu, 21 Mar 2013 12:21:40 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id ha11so2211507vcb.2 for ; Thu, 21 Mar 2013 05:21:40 -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=SZss/5YFe+Rw6k01nubX6bZKx0Oqc7kVtwJZOxU3Krg=; b=VFyyU8tHs/BblIYjOTd0U4zaC2MrnmVuvXTe0gkCiROCo28wglTGyj+nDxxiRL7l4O R1Q2YL9LCbXrvZrC/2WyA94YRpZvWmpvDtChydQUqh/aO2HSp/igWGdvdQ/BqKEgnsTN Fvz7U+Lqdh0pNe3Z0JVBENe2UncMCVhN+i1eXD5LsfIPgNk5D9O8qXTQsgHv9awxi/kH xI1sKMB9EwNrwH5MW8LaLQ1jQ3dBo47lxvvfMND8rRzge6lLHReV41R8au86MsHrnGmv 3gM7OD/XZ0jjgcMcbBs6oBm+m1qSt0DZ7RunQtIpwYRg4KFrWCm6Bjf+lJuRy4Ch7Vj0 IiGw== X-Received: by 10.220.153.143 with SMTP id k15mr12903183vcw.33.1363868500062; Thu, 21 Mar 2013 05:21:40 -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 ty6csp57790vec; Thu, 21 Mar 2013 05:21:39 -0700 (PDT) X-Received: by 10.180.103.40 with SMTP id ft8mr4514141wib.28.1363868499159; Thu, 21 Mar 2013 05:21:39 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id da4si2324123wjc.169.2013.03.21.05.21.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:39 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=74.125.82.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.48 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-f48.google.com with SMTP id 16so413212wgi.3 for ; Thu, 21 Mar 2013 05:21:38 -0700 (PDT) X-Received: by 10.180.37.146 with SMTP id y18mr4597305wij.10.1363868498754; Thu, 21 Mar 2013 05:21:38 -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.36 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:38 -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 2/4] cpuidle / omap4 : use CPUIDLE_FLAG_TIMER_STOP flag Date: Thu, 21 Mar 2013 13:21:32 +0100 Message-Id: <1363868494-5503-2-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: ALoCoQmHDxWjUki9hiYOS/Xp4NxusTdi6eDWZQpNs/px27VFFuzevcwGfLk0JqHIfeVLHPpThatn 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 Reviewed-by: Kevin Hilman --- arch/arm/mach-omap2/cpuidle44xx.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index d639aef..fe0e025 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -82,7 +82,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev, int index) { struct omap4_idle_statedata *cx = &omap4_idle_data[index]; - int cpu_id = smp_processor_id(); local_fiq_disable(); @@ -109,8 +108,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev, } } - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id); - /* * Call idle CPU PM enter notifier chain so that * VFP and per CPU interrupt context is saved. @@ -152,8 +149,6 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev, if (omap4_mpuss_read_prev_context_state()) cpu_cluster_pm_exit(); - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id); - fail: cpuidle_coupled_parallel_barrier(dev, &abort_barrier); cpu_done[dev->cpu] = false; @@ -193,7 +188,8 @@ static struct cpuidle_driver omap4_idle_driver = { /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */ .exit_latency = 328 + 440, .target_residency = 960, - .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED, + .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED | + CPUIDLE_FLAG_TIMER_STOP, .enter = omap4_enter_idle_coupled, .name = "C2", .desc = "MPUSS CSWR", @@ -202,7 +198,8 @@ static struct cpuidle_driver omap4_idle_driver = { /* C3 - CPU0 OFF + CPU1 OFF + MPU OSWR */ .exit_latency = 460 + 518, .target_residency = 1100, - .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED, + .flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED | + CPUIDLE_FLAG_TIMER_STOP, .enter = omap4_enter_idle_coupled, .name = "C3", .desc = "MPUSS OSWR",