From patchwork Thu Mar 21 12:21:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 15467 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 EEE5923E00 for ; Thu, 21 Mar 2013 12:21:46 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id A88E7A1878A for ; Thu, 21 Mar 2013 12:21:46 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so1893226vbb.3 for ; Thu, 21 Mar 2013 05:21:46 -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=AMFtOmWmQ3AK/duEEIa+q7ttYjB4ZRdVxSSDd8Lgu9I=; b=kOoeV62klbmdtEfevtxH155AW3wCAkw2xC1BqdWAWa9bk/1YjDMn9svkmYbJZrtUM1 x2vaZ98dyUQr0qvG4S6vmeVT5QxevjKfcN+v79TQWb9DgZcPTEl/jINT08Ammbma4VbP Hp0FIRxf3vNbfb9qT1LtC8VifhdTWQFiVVBXCYXzoLRQbcwo72avEnSUF+83YEwQ1fa7 x/sVoMFMcROk+LYfyeVj9ByfZYQNQpoSEziZWdF8gT9/njT3NAasO/C6nk4ymG1Mv7Gv ZAqueRxoAhT602pl3ab5mLBV5EX0tw3boOzQQhhQknbEblKYT98C1BtM9wLKcf4f9nMc 7h9A== X-Received: by 10.58.210.200 with SMTP id mw8mr13108772vec.32.1363868506090; Thu, 21 Mar 2013 05:21:46 -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 ty6csp57796vec; Thu, 21 Mar 2013 05:21:45 -0700 (PDT) X-Received: by 10.181.12.5 with SMTP id em5mr4275229wid.24.1363868505172; Thu, 21 Mar 2013 05:21:45 -0700 (PDT) Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by mx.google.com with ESMTPS id j8si1170055wia.14.2013.03.21.05.21.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:45 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::235 is neither permitted nor denied by best guess record for domain of daniel.lezcano@linaro.org) client-ip=2a00:1450:400c:c05::235; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::235 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-wi0-f181.google.com with SMTP id hm6so2983415wib.14 for ; Thu, 21 Mar 2013 05:21:44 -0700 (PDT) X-Received: by 10.194.63.109 with SMTP id f13mr16946714wjs.11.1363868504616; Thu, 21 Mar 2013 05:21:44 -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.42 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Mar 2013 05:21:43 -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 4/4] cpuidle / ux500 : use CPUIDLE_FLAG_TIMER_STOP flag Date: Thu, 21 Mar 2013 13:21:34 +0100 Message-Id: <1363868494-5503-4-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: ALoCoQm76I1gfk+1K8z2Wn2McKCKHnfbk3XXq3NPJZYEz78gl9hEMKo5addLMSYU1NzmGTg6V0a7 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 --- arch/arm/mach-ux500/cpuidle.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index ce91493..6d0c4b6 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c @@ -30,8 +30,6 @@ static inline int ux500_enter_idle(struct cpuidle_device *dev, int this_cpu = smp_processor_id(); bool recouple = false; - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &this_cpu); - if (atomic_inc_return(&master) == num_online_cpus()) { /* With this lock, we prevent the other cpu to exit and enter @@ -91,8 +89,6 @@ out: spin_unlock(&master_lock); } - clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &this_cpu); - return index; } @@ -106,7 +102,8 @@ static struct cpuidle_driver ux500_idle_driver = { .enter = ux500_enter_idle, .exit_latency = 70, .target_residency = 260, - .flags = CPUIDLE_FLAG_TIME_VALID, + .flags = CPUIDLE_FLAG_TIME_VALID | + CPUIDLE_FLAG_TIMER_STOP, .name = "ApIdle", .desc = "ARM Retention", },