Re: [PATCH] ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency

2015-02-26 Thread Kukjin Kim
On 02/18/15 07:24, Stephen Boyd wrote:
> On 02/16/15 05:36, Krzysztof Kozlowski wrote:
>> 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().
>>
>> Signed-off-by: Krzysztof Kozlowski 
>> Fixes: adc548d77c22 ("ARM: EXYNOS: Use MCPM call-backs to support S2R on 
>> exynos5420")
>> Cc: 
>> Reported-by: Stephen Boyd 
>> ---
> 
> Looks good to me.
> 
> Reviewed-by: Stephen Boyd 
> 
Thanks for this fix, applied.

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


Re: [PATCH] ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency

2015-02-26 Thread Kukjin Kim
On 02/18/15 07:24, Stephen Boyd wrote:
 On 02/16/15 05:36, Krzysztof Kozlowski wrote:
 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().

 Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
 Fixes: adc548d77c22 (ARM: EXYNOS: Use MCPM call-backs to support S2R on 
 exynos5420)
 Cc: sta...@vger.kernel.org
 Reported-by: Stephen Boyd sb...@codeaurora.org
 ---
 
 Looks good to me.
 
 Reviewed-by: Stephen Boyd sb...@codeaurora.org
 
Thanks for this fix, applied.

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


Re: [PATCH] ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency

2015-02-17 Thread Stephen Boyd
On 02/16/15 05:36, Krzysztof Kozlowski wrote:
> 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().
>
> Signed-off-by: Krzysztof Kozlowski 
> Fixes: adc548d77c22 ("ARM: EXYNOS: Use MCPM call-backs to support S2R on 
> exynos5420")
> Cc: 
> Reported-by: Stephen Boyd 
> ---

Looks good to me.

Reviewed-by: Stephen Boyd 

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


Re: [PATCH] ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency

2015-02-17 Thread Stephen Boyd
On 02/16/15 05:36, Krzysztof Kozlowski wrote:
 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().

 Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
 Fixes: adc548d77c22 (ARM: EXYNOS: Use MCPM call-backs to support S2R on 
 exynos5420)
 Cc: sta...@vger.kernel.org
 Reported-by: Stephen Boyd sb...@codeaurora.org
 ---

Looks good to me.

Reviewed-by: Stephen Boyd sb...@codeaurora.org

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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


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

2015-02-16 Thread Krzysztof Kozlowski
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().

Signed-off-by: Krzysztof Kozlowski 
Fixes: adc548d77c22 ("ARM: EXYNOS: Use MCPM call-backs to support S2R on 
exynos5420")
Cc: 
Reported-by: Stephen Boyd 
---
 arch/arm/mach-exynos/platsmp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 7a1ebfb8..0abb7dff73ab 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -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
-- 
1.9.1

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


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

2015-02-16 Thread Krzysztof Kozlowski
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().

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
Fixes: adc548d77c22 (ARM: EXYNOS: Use MCPM call-backs to support S2R on 
exynos5420)
Cc: sta...@vger.kernel.org
Reported-by: Stephen Boyd sb...@codeaurora.org
---
 arch/arm/mach-exynos/platsmp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 7a1ebfb8..0abb7dff73ab 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -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
-- 
1.9.1

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