From patchwork Tue Mar 20 20:22:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob X-Patchwork-Id: 7373 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 79A8923DC3 for ; Tue, 20 Mar 2012 20:23:31 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3C2DDA18179 for ; Tue, 20 Mar 2012 20:23:31 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so671092iag.11 for ; Tue, 20 Mar 2012 13:23:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=QO/e6aVI6L8DsmtHVIdqSol3VJxwy2avUCyqT+MOt7g=; b=SmR/lo4n85wcK7bXpzuSbF0qEKvKFs5yoJG7D+70pt/NeiuIfFHWaII6M4RFi2sIT1 5Or+xkP5vv3jgQOYUmIJrT8RsOGmB+rfsLrE/jXt3JBJeOYep258WbqCpfYIQfK+xguP gKZCVaZZ9Up0N/WgNy6tFPeY/Fp5dMupXe+bxu6+Qp6BP0it8Vd3OTe6qGUf6JKIe/cD KlkjuE/IyYlt1YL/ilvQ/bRgvJr0IAHPKSYjI4pj3aILhUxDXNUjDnhV2RVnrzjkPB5D gCLSDogwJ4d2fYL0ioYNIdzrJyfPYlGCWBPsxmBDmYNDL7GfBZGyebzGbXMO+mngxJTg v91w== Received: by 10.50.156.226 with SMTP id wh2mr1062295igb.2.1332275011027; Tue, 20 Mar 2012 13:23:31 -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.231.203.79 with SMTP id fh15csp12159ibb; Tue, 20 Mar 2012 13:23:30 -0700 (PDT) Received: by 10.229.102.79 with SMTP id f15mr541140qco.94.1332275010037; Tue, 20 Mar 2012 13:23:30 -0700 (PDT) Received: from mail-qa0-f43.google.com (mail-qa0-f43.google.com [209.85.216.43]) by mx.google.com with ESMTPS id c10si1072265qcd.185.2012.03.20.13.23.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Mar 2012 13:23:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.43 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) client-ip=209.85.216.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.43 is neither permitted nor denied by best guess record for domain of rob.lee@linaro.org) smtp.mail=rob.lee@linaro.org Received: by mail-qa0-f43.google.com with SMTP id b15so1781105qad.16 for ; Tue, 20 Mar 2012 13:23:29 -0700 (PDT) Received: by 10.229.111.76 with SMTP id r12mr582836qcp.43.1332275006103; Tue, 20 Mar 2012 13:23:26 -0700 (PDT) Received: from localhost.localdomain ([216.59.27.113]) by mx.google.com with ESMTPS id n8sm4392976qan.12.2012.03.20.13.23.21 (version=SSLv3 cipher=OTHER); Tue, 20 Mar 2012 13:23:25 -0700 (PDT) From: Robert Lee To: len.brown@intel.com Cc: akpm@linux-foundation.org, rjw@sisk.pl, khilman@ti.com, robherring2@gmail.com, Baohua.Song@csr.com, amit.kucheria@linaro.org, nicolas.ferre@atmel.com, linux@maxim.org.za, kgene.kim@samsung.com, amit.kachhap@linaro.org, magnus.damm@gmail.com, nsekhar@ti.com, daniel.lezcano@linaro.org, mturquette@linaro.org, vincent.guittot@linaro.org, arnd.bergmann@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-dev@lists.linaro.org, patches@linaro.org, deepthi@linux.vnet.ibm.com, broonie@opensource.wolfsonmicro.com, nicolas.pitre@linaro.org, linux@arm.linux.org.uk, jean.pihet@newoldbits.com, venki@google.com, ccross@google.com, g.trinabh@gmail.com, kernel@wantstofly.org, lethal@linux-sh.org, jon-hunter@ti.com, tony@atomide.com, linux-omap@vger.kernel.org, linux-sh@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v8 8/8] SH: shmobile: Consolidate time keeping and irq enable Date: Tue, 20 Mar 2012 15:22:49 -0500 Message-Id: <1332274969-15782-9-git-send-email-rob.lee@linaro.org> X-Mailer: git-send-email 1.7.9.4 In-Reply-To: <1332274969-15782-1-git-send-email-rob.lee@linaro.org> References: <1332274969-15782-1-git-send-email-rob.lee@linaro.org> X-Gm-Message-State: ALoCoQmRa07xeL3yoJWlFJe4BnRyrT/hyY9XZcQvaFKk0Idh8U0aPlfvbShaPO5P2uadKOH1ta+0 Enable core cpuidle timekeeping and irq enabling and remove that handling from this code. Signed-off-by: Robert Lee Reviewed-by: Kevin Hilman Reviewed-by: Daniel Lezcano Acked-by: Jean Pihet --- arch/sh/kernel/cpu/shmobile/cpuidle.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index 6d62eb4..1ddc876 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -29,7 +29,6 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, int index) { unsigned long allowed_mode = SUSP_SH_SLEEP; - ktime_t before, after; int requested_state = index; int allowed_state; int k; @@ -47,19 +46,16 @@ static int cpuidle_sleep_enter(struct cpuidle_device *dev, */ k = min_t(int, allowed_state, requested_state); - before = ktime_get(); sh_mobile_call_standby(cpuidle_mode[k]); - after = ktime_get(); - - dev->last_residency = (int)ktime_to_ns(ktime_sub(after, before)) >> 10; return k; } static struct cpuidle_device cpuidle_dev; static struct cpuidle_driver cpuidle_driver = { - .name = "sh_idle", - .owner = THIS_MODULE, + .name = "sh_idle", + .owner = THIS_MODULE, + .en_core_tk_irqen = 1, }; void sh_mobile_setup_cpuidle(void)