From: Venkatesh Pallipadi Date: Tue, 27 Jan 2009 16:38:45 +0000 (+0100) Subject: cpuidle: use last_state which can reflect the actual state entered X-Git-Tag: v2.6.27.15~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e703f5777cc32d55a8d926df51fd3a07a4ee3d9;p=pandora-kernel.git cpuidle: use last_state which can reflect the actual state entered commit 887e301aa1105326f1412a98749024263b1031c7 upstream cpuidle accounts the idle time for the C-state it was trying to enter and not to the actual state that the driver eventually entered. The driver may select a different state than the one chosen by cpuidle due to constraints like bus-mastering, etc. Change the time acounting code to look at the dev->last_state after returning from target_state->enter(). Driver can modify dev->last_state internally, inside the enter routine to reflect the actual C-state entered. Signed-off-by: Venkatesh Pallipadi Tested-by: Kevin Hilman Signed-off-by: Len Brown Cc: Thomas Renninger Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed