]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: EXYNOS: cpuidle: fix AFTR mode check
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 20 Dec 2013 18:47:23 +0000 (19:47 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 6 Jan 2014 11:45:51 +0000 (12:45 +0100)
commitdcbb21c24ab7c3d7ba5c84a7dc1b7268a1fa4d97
tree656187c1e07539ba6e77ff1e401ebe5bb407efc9
parent3308d535806dfce3e4dfe06743f16dc925aa4c4c
ARM: EXYNOS: cpuidle: fix AFTR mode check

The EXYNOS cpuidle driver code assumes that cpuidle core will handle
dev->state_count smaller than drv->state_count but currently this is
untrue (dev->state_count is used only for handling cpuidle state sysfs
entries and drv->state_count is used for all other cases) and will not
be fixed in the future as dev->state_count is planned to be removed.

Fix the issue by checking for the max supported idle state in AFTR
state's ->enter handler (exynos4_enter_lowpower()) and entering AFTR
mode only when cores other than CPU0 are offline.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/arm/mach-exynos/cpuidle.c