Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca489c58 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Kukjin Kim
Browse files

ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency



During CPU shutdown the exynos_cpu_power_down() is called after
disabling cache coherency and it uses LDREX and STREX instructions (by
calling of_machine_is_compatible() -> kobject_get() -> kref_get()).

The LDREX and STREX should not be used after disabling the cache
coherency so just use soc_is_exynos().

Fixes: adc548d7 ("ARM: EXYNOS: Use MCPM call-backs to support S2R
on exynos5420")

Reported-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarKukjin Kim <kgene@kernel.org>
parent c517d838
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -126,8 +126,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
 */
void exynos_cpu_power_down(int cpu)
{
	if (cpu == 0 && (of_machine_is_compatible("samsung,exynos5420") ||
		of_machine_is_compatible("samsung,exynos5800"))) {
	if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) {
		/*
		 * Bypass power down for CPU0 during suspend. Check for
		 * the SYS_PWR_REG value to decide if we are suspending