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  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:	Thu, 03 Apr 2014 10:18:20 +0200
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Gregory CLEMENT <gregory.clement@...e-electrons.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
	Jason Cooper <jason@...edaemon.net>,
	Andrew Lunn <andrew@...n.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
CC:	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
	linux-arm-kernel@...ts.infradead.org,
	Lior Amsalem <alior@...vell.com>,
	Tawfik Bayouk <tawfik@...vell.com>,
	Nadav Haklai <nadavh@...vell.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 09/11] ARM: mvebu: Register notifier callback for the
 cpuidle transition

On 03/28/2014 12:13 PM, Gregory CLEMENT wrote:
> In order to have well encapsulated code, we use notifier callbacks for
> CPU_PM_ENTER and CPU_PM_EXIT inside the mvebu power management code.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@...e-electrons.com>

Acked-by: Daniel Lezcano <daniel.lezcano@...aro.org>

> ---
>   arch/arm/mach-mvebu/pmsu.c | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>
> diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
> index 968c8c02c126..9ea2bb44d573 100644
> --- a/arch/arm/mach-mvebu/pmsu.c
> +++ b/arch/arm/mach-mvebu/pmsu.c
> @@ -18,6 +18,7 @@
>
>   #define pr_fmt(fmt) "mvebu-pmsu: " fmt
>
> +#include <linux/cpu_pm.h>
>   #include <linux/kernel.h>
>   #include <linux/init.h>
>   #include <linux/of_address.h>
> @@ -263,4 +264,21 @@ static noinline void armada_370_xp_pmsu_idle_restore(void)
>   	writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu));
>   }
>
> +static int armada_370_xp_cpu_pm_notify(struct notifier_block *self,
> +				    unsigned long action, void *hcpu)
> +{
> +	if (action == CPU_PM_ENTER) {
> +		unsigned int hw_cpu = cpu_logical_map(smp_processor_id());
> +		mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume);
> +	} else if (action == CPU_PM_EXIT) {
> +		armada_370_xp_pmsu_idle_restore();
> +	}
> +
> +	return NOTIFY_OK;
> +}
> +
> +static struct notifier_block armada_370_xp_cpu_pm_notifier = {
> +	.notifier_call = armada_370_xp_cpu_pm_notify,
> +};
> +
>   early_initcall(armada_370_xp_pmsu_init);
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
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