lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 May 2014 13:50:45 +0200
From:	Tomasz Figa <tomasz.figa@...il.com>
To:	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Russell King <linux@....linux.org.uk>,
	Kukjin Kim <kgene.kim@...sung.com>,
	linux-arm-kernel@...ts.infradead.org,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
CC:	Kyungmin Park <kyungmin.park@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Tomasz Figa <t.figa@...sung.com>
Subject: Re: [PATCH] ARM: exynos4212: hotplug: Fix CPU idle clock down after
 CPU1 off

Hi Krzysztof,

On 13.05.2014 16:12, Krzysztof Kozlowski wrote:
> On Exynos4212 USE_DELAYED_RESET_ASSERTION must be set in
> ARM_CORE1_OPTION register during CPU power down. This is the proper way
> of powering down CPU. Additionally without this the CPU clock down won't
> work after powering down CPU1 and CPU will work at full frequency chosen
> by CPUfreq governor.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> ---
>  arch/arm/mach-exynos/hotplug.c  | 28 +++++++++++++++++++++++++---
>  arch/arm/mach-exynos/regs-pmu.h |  2 ++
>  2 files changed, 27 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
> index 5eead530c6f8..59b813e74558 100644
> --- a/arch/arm/mach-exynos/hotplug.c
> +++ b/arch/arm/mach-exynos/hotplug.c
> @@ -74,7 +74,7 @@ static inline void cpu_enter_lowpower_a15(void)
>  	dsb();
>  }
>  
> -static inline void cpu_leave_lowpower(void)
> +static inline void cpu_leave_lowpower(unsigned int cpu)
>  {
>  	unsigned int v;
>  
> @@ -88,6 +88,14 @@ static inline void cpu_leave_lowpower(void)
>  	  : "=&r" (v)
>  	  : "Ir" (CR_C), "Ir" (0x40)
>  	  : "cc");
> +
> +	if (cpu == 1 && soc_is_exynos4212()) {

AFAIK this is needed not only on Exynos4x12, but at least also on 4412.
Also I don't think the (cpu == 1) condition is necessary. See below.

> +		unsigned int tmp;
> +
> +		tmp = __raw_readl(S5P_ARM_CORE1_OPTION);
> +		tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
> +		__raw_writel(tmp, S5P_ARM_CORE1_OPTION);
> +	}
>  }
>  
>  static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
> @@ -95,8 +103,22 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
>  	for (;;) {
>  
>  		/* make cpu1 to be turned off at next WFI command */
> -		if (cpu == 1)
> +		if (cpu == 1) {

I think this patch should be rebased on top of my "[PATCH] ARM: EXYNOS:
Fix core ID used by platsmp and hotplug code". Then instead of if (cpu
== 1) you would just use EXYNOS_ARM_CORE_OPTION(core_id).

Also same comment as above, I believe this is also needed on Exynos4412.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ