FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
Subsystems (3)
PATCH 1/1 FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
The commit 2bf73dd61a84cdf27e49f48e08739af6ba70ace1 has made the cache configuration depending on definition of CONFIG_S5P_SLEEP Kconfig flag. It is enabled on various S5PV210 incarnations and not available at Exynos4 family of SoCs.
The problem emerges when one wants to disable/enable core via hotplug - e.g:
echo 0 > /sys/devices/system/cpu/cpu1/online.
When CONFIG_CPU_IDLE is enabled (it is not enabled at default exynos_defconfig).
On Exynos4 based targets (Exynos4412 and Exynos4210, namely trats2 and trats) board locks up and consumes considerable power.
This patch does nothing more than restoration of the state before the offending commit.
Tested on top of next-20140514 at Trats board.
--- arch/arm/mach-exynos/exynos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
arch/arm/mach-exynos/exynos.c +3 -4
@@ -254,10 +254,9 @@ static int __init exynos4_l2x0_cache_init(void)if (ret)return ret; -if (IS_ENABLED (CONFIG_S5P_SLEEP )) { - l2x0_regs_phys =virt_to_phys (&l2x0_saved_regs); -clean_dcache_area (&l2x0_regs_phys,sizeof (unsigned long )); - } + l2x0_regs_phys =virt_to_phys (&l2x0_saved_regs); +clean_dcache_area (&l2x0_regs_phys,sizeof (unsigned long )); +return 0 ; }early_initcall (exynos4_l2x0_cache_init);
Signature · 1 line
1.7.10.4
PATCH 1/1 FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
Quoted 27 lines · Lukasz Majewski
The commit
2bf73dd61a84cdf27e49f48e08739af6ba70ace1has made the cache configuration depending on definition ofCONFIG_S5P_SLEEPKconfigflag. It is enabled on various S5PV210 incarnations and not available at Exynos4 family of SoCs.The problem emerges when one wants to disable/enable core via hotplug - e.g:
echo 0>/sys/devices/system/cpu/cpu1/online.
WhenCONFIG_CPU_IDLEis enabled (it is not enabled at defaultexynos_defconfig).On Exynos4 based targets (Exynos4412 and Exynos4210, namely trats2 and trats) board locks up and consumes considerable power.
This patch does nothing more than restoration of the state before the offending commit.
Tested on top of next-20140514 at Trats board.
Signed-off-by Lukasz Majewski<[email protected]>--- arch/arm/mach-exynos/exynos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-exynos/exynos.c +0
-0
arch/arm/mach-exynos/exynos.c static int __init exynos4_l2x0_cache_init(void) · line 260
Quoted 7 lines
arch/arm/mach-exynos/exynos.c +0
-4@@ -254,10 +254,9 @@ static int __init exynos4_l2x0_cache_init(void)if (ret)return ret; -if (IS_ENABLED (CONFIG_S5P_SLEEP )) { - l2x0_regs_phys =virt_to_phys (&l2x0_saved_regs); -clean_dcache_area (&l2x0_regs_phys,sizeof (unsigned long )); - }
Hmm...should be PM_SLEEP instead of removing check the S5P_SLEEP. This is missed when we stopped to use legacy Samsung PM(commit ID d710aa31)
- Kukjin
Quoted 6 lines
arch/arm/mach-exynos/exynos.c +3
-0+ l2x0_regs_phys =virt_to_phys (&l2x0_saved_regs); +clean_dcache_area (&l2x0_regs_phys,sizeof (unsigned long )); +return 0 ; }early_initcall (exynos4_l2x0_cache_init);
PATCH 1/1 FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
Quoted 35 lines · Kukjin Kim
Quoted 34 lines · Lukasz Majewski
The commit
2bf73dd61a84cdf27e49f48e08739af6ba70ace1has made the cache configuration depending on definition ofCONFIG_S5P_SLEEPKconfigflag. It is enabled on various S5PV210 incarnations and not available at Exynos4
family of SoCs.The problem emerges when one wants to disable/enable core via hotplug
- e.g:
echo 0>/sys/devices/system/cpu/cpu1/online.
WhenCONFIG_CPU_IDLEis enabled (it is not enabled at defaultexynos_defconfig).On Exynos4 based targets (Exynos4412 and Exynos4210, namely trats2 and trats) board locks up and consumes considerable power.
This patch does nothing more than restoration of the state before the offending commit.
Tested on top of next-20140514 at Trats board.
Signed-off-by Lukasz Majewski<[email protected]>--- arch/arm/mach-exynos/exynos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)arch/arm/mach-exynos/exynos.c +0
-0@@ -254,10 +254,9 @@ static int __init exynos4_l2x0_cache_init(void)if (ret)return ret;
Quoted 7 lines
arch/arm/mach-exynos/exynos.c static int __init exynos4_l2x0_cache_init(void) · line 260
Quoted 4 lines
arch/arm/mach-exynos/exynos.c +0
-4-if (IS_ENABLED (CONFIG_S5P_SLEEP )) { - l2x0_regs_phys =virt_to_phys (&l2x0_saved_regs); -clean_dcache_area (&l2x0_regs_phys,sizeof (unsigned long )); - }Hmm...should be
PM_SLEEPinstead of removing check theS5P_SLEEP. This is missed when we stopped to use legacy Samsung PM(commit IDd710aa31)
Yes, should be. I have already discussed this with Lukasz and he was supposed to send next version.
Best regards,
Tomasz