lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 Mar 2012 15:22:48 -0500
From:	Robert Lee <rob.lee@...aro.org>
To:	len.brown@...el.com
Cc:	akpm@...ux-foundation.org, rjw@...k.pl, khilman@...com,
	robherring2@...il.com, Baohua.Song@....com,
	amit.kucheria@...aro.org, nicolas.ferre@...el.com,
	linux@...im.org.za, kgene.kim@...sung.com, amit.kachhap@...aro.org,
	magnus.damm@...il.com, nsekhar@...com, daniel.lezcano@...aro.org,
	mturquette@...aro.org, vincent.guittot@...aro.org,
	arnd.bergmann@...aro.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linaro-dev@...ts.linaro.org,
	patches@...aro.org, deepthi@...ux.vnet.ibm.com,
	broonie@...nsource.wolfsonmicro.com, nicolas.pitre@...aro.org,
	linux@....linux.org.uk, jean.pihet@...oldbits.com,
	venki@...gle.com, ccross@...gle.com, g.trinabh@...il.com,
	kernel@...tstofly.org, lethal@...ux-sh.org, jon-hunter@...com,
	tony@...mide.com, linux-omap@...r.kernel.org,
	linux-sh@...r.kernel.org, linux-pm@...r.kernel.org
Subject: [PATCH v8 7/8] ARM: shmobile: Consolidate time keeping and irq enable

Enable core cpuidle timekeeping and irq enabling and remove that
handling from this code.

Signed-off-by: Robert Lee <rob.lee@...aro.org>
Reviewed-by: Kevin Hilman <khilman@...com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Acked-by: Jean Pihet<j-pihet@...com>
---
 arch/arm/mach-shmobile/cpuidle.c |   31 +++++++------------------------
 1 file changed, 7 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
index 1b23342..ca23b20 100644
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ b/arch/arm/mach-shmobile/cpuidle.c
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/err.h>
 #include <asm/system.h>
+#include <asm/cpuidle.h>
 #include <asm/io.h>
 
 static void shmobile_enter_wfi(void)
@@ -29,37 +30,19 @@ static int shmobile_cpuidle_enter(struct cpuidle_device *dev,
 				  struct cpuidle_driver *drv,
 				  int index)
 {
-	ktime_t before, after;
-
-	before = ktime_get();
-
-	local_irq_disable();
-	local_fiq_disable();
-
 	shmobile_cpuidle_modes[index]();
 
-	local_irq_enable();
-	local_fiq_enable();
-
-	after = ktime_get();
-	dev->last_residency = ktime_to_ns(ktime_sub(after, before)) >> 10;
-
 	return index;
 }
 
 static struct cpuidle_device shmobile_cpuidle_dev;
 static struct cpuidle_driver shmobile_cpuidle_driver = {
-	.name =		"shmobile_cpuidle",
-	.owner =	THIS_MODULE,
-	.states[0] = {
-		.name = "C1",
-		.desc = "WFI",
-		.exit_latency = 1,
-		.target_residency = 1 * 2,
-		.flags = CPUIDLE_FLAG_TIME_VALID,
-	},
-	.safe_state_index = 0, /* C1 */
-	.state_count = 1,
+	.name			= "shmobile_cpuidle",
+	.owner			= THIS_MODULE,
+	.en_core_tk_irqen	= 1,
+	.states[0]		= ARM_CPUIDLE_WFI_STATE,
+	.safe_state_index	= 0, /* C1 */
+	.state_count		= 1,
 };
 
 void (*shmobile_cpuidle_setup)(struct cpuidle_driver *drv);
-- 
1.7.9.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ