From 7280919965cf4390f51def49413934e4fd98841c Mon Sep 17 00:00:00 2001 From: Sumit Singh Date: Mon, 21 Apr 2014 15:29:54 +0530 Subject: cpu: enhance power efficiency Here we are trying to reduce power usage through the use of macros cpu_relaxed_read and relaxed version of idle_cpu(). Bug 1440421 Change-Id: I0a8c5d358c154782b41570059d03d7e0de87e82c Signed-off-by: Sumit Singh Reviewed-on: http://git-master/r/426485 Reviewed-by: Sri Krishna Chowdary GVS: Gerrit_Virtual_Submit Reviewed-by: Alexander Van Brunt --- kernel/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/cpu.c b/kernel/cpu.c index 9dd31fafaa81..43f6fcf752b0 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -328,8 +328,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) * * Wait for the stop thread to go away. */ - while (!idle_cpu(cpu)) - cpu_relax(); + while (!idle_cpu_relaxed(cpu)) + cpu_read_relax(); /* This actually kills the CPU. */ __cpu_die(cpu); -- cgit v1.2.3