All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
@ 2014-05-15 11:34 ` Lukasz Majewski
  0 siblings, 0 replies; 6+ messages in thread
From: Lukasz Majewski @ 2014-05-15 11:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kukjin Kim, linux-samsung-soc@vger.kernel.org, Kevin Hilman,
	arm@kernel.org, Lukasz Majewski,
	linux-arm-kernel@lists.infradead.org, 'Olof Johansson',
	Bartlomiej Zolnierkiewicz, Daniel Lezcano, Krzysztof Kozlowski,
	Lukasz Majewski

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.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
 arch/arm/mach-exynos/exynos.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 1b97b93..5c8b334 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
@ 2014-05-15 11:34 ` Lukasz Majewski
  0 siblings, 0 replies; 6+ messages in thread
From: Lukasz Majewski @ 2014-05-15 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
 arch/arm/mach-exynos/exynos.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 1b97b93..5c8b334 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
  2014-05-15 11:34 ` Lukasz Majewski
@ 2014-05-15 20:55   ` Kukjin Kim
  -1 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2014-05-15 20:55 UTC (permalink / raw)
  To: Lukasz Majewski
  Cc: Arnd Bergmann, Kukjin Kim, linux-samsung-soc@vger.kernel.org,
	Kevin Hilman, arm@kernel.org, Lukasz Majewski,
	linux-arm-kernel@lists.infradead.org, 'Olof Johansson',
	Bartlomiej Zolnierkiewicz, Daniel Lezcano, Krzysztof Kozlowski

On 05/15/14 20:34, Lukasz Majewski wrote:
> 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.
>
> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
> ---
>   arch/arm/mach-exynos/exynos.c |    7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 1b97b93..5c8b334 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -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

> +	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);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
@ 2014-05-15 20:55   ` Kukjin Kim
  0 siblings, 0 replies; 6+ messages in thread
From: Kukjin Kim @ 2014-05-15 20:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/15/14 20:34, Lukasz Majewski wrote:
> 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.
>
> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
> ---
>   arch/arm/mach-exynos/exynos.c |    7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
> index 1b97b93..5c8b334 100644
> --- a/arch/arm/mach-exynos/exynos.c
> +++ b/arch/arm/mach-exynos/exynos.c
> @@ -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

> +	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);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
  2014-05-15 20:55   ` Kukjin Kim
@ 2014-05-15 21:02     ` Tomasz Figa
  -1 siblings, 0 replies; 6+ messages in thread
From: Tomasz Figa @ 2014-05-15 21:02 UTC (permalink / raw)
  To: Kukjin Kim, Lukasz Majewski
  Cc: Krzysztof Kozlowski, linux-samsung-soc@vger.kernel.org,
	arm@kernel.org, Arnd Bergmann, Bartlomiej Zolnierkiewicz,
	Lukasz Majewski, Daniel Lezcano, Kevin Hilman,
	'Olof Johansson', linux-arm-kernel@lists.infradead.org

On 15.05.2014 22:55, Kukjin Kim wrote:
> On 05/15/14 20:34, Lukasz Majewski wrote:
>> 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.
>>
>> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
>> ---
>>   arch/arm/mach-exynos/exynos.c |    7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c
>> b/arch/arm/mach-exynos/exynos.c
>> index 1b97b93..5c8b334 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -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)

Yes, should be. I have already discussed this with Lukasz and he was
supposed to send next version.

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4
@ 2014-05-15 21:02     ` Tomasz Figa
  0 siblings, 0 replies; 6+ messages in thread
From: Tomasz Figa @ 2014-05-15 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On 15.05.2014 22:55, Kukjin Kim wrote:
> On 05/15/14 20:34, Lukasz Majewski wrote:
>> 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.
>>
>> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
>> ---
>>   arch/arm/mach-exynos/exynos.c |    7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/exynos.c
>> b/arch/arm/mach-exynos/exynos.c
>> index 1b97b93..5c8b334 100644
>> --- a/arch/arm/mach-exynos/exynos.c
>> +++ b/arch/arm/mach-exynos/exynos.c
>> @@ -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)

Yes, should be. I have already discussed this with Lukasz and he was
supposed to send next version.

Best regards,
Tomasz

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-15 21:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15 11:34 [PATCH] FIX:cache:exynos: Execute the cache reconfiguration unconditionally for Exynos4 Lukasz Majewski
2014-05-15 11:34 ` Lukasz Majewski
2014-05-15 20:55 ` Kukjin Kim
2014-05-15 20:55   ` Kukjin Kim
2014-05-15 21:02   ` Tomasz Figa
2014-05-15 21:02     ` Tomasz Figa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.