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]
Message-ID: <20180822073409.GK14967@localhost>
Date:   Wed, 22 Aug 2018 09:34:09 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Keerthy <j-keerthy@...com>
Cc:     tony@...mide.com, d-gerlach@...com, linux-kernel@...r.kernel.org,
        t-kristo@...com, ssantosh@...nel.org, linux-omap@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] soc: ti: pm33xx: Enable DS0 for the platforms on which
 it is functional

On Wed, Aug 22, 2018 at 11:02:31AM +0530, Keerthy wrote:
> Enable DS0 for only those platforms on which it is functional
> 
> Signed-off-by: Keerthy <j-keerthy@...com>
> ---
>  arch/arm/mach-omap2/pm33xx-core.c    | 5 +++++
>  drivers/soc/ti/pm33xx.c              | 9 +++++++++
>  include/linux/platform_data/pm33xx.h | 2 ++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
> index f4971e4..f0f6e8e 100644
> --- a/arch/arm/mach-omap2/pm33xx-core.c
> +++ b/arch/arm/mach-omap2/pm33xx-core.c
> @@ -135,6 +135,11 @@ static int am43xx_suspend(unsigned int state, int (*fn)(unsigned long),
>  {
>  	int ret = 0;
>  
> +	if (!(args & WFI_FLAG_DEEP_SLEEP0)) {
> +		pr_err("DS0 mode not supported\n");
> +		return -ENOTSUPP;
> +	}
> +
>  	amx3_pre_suspend_common();
>  	scu_power_mode(scu_base, SCU_PM_POWEROFF);
>  	ret = cpu_suspend(args, fn);
> diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
> index d0dab32..53238d7 100644
> --- a/drivers/soc/ti/pm33xx.c
> +++ b/drivers/soc/ti/pm33xx.c
> @@ -324,6 +324,15 @@ static int am33xx_pm_probe(struct platform_device *pdev)
>  	suspend_wfi_flags |= WFI_FLAG_SAVE_EMIF;
>  	suspend_wfi_flags |= WFI_FLAG_WAKE_M3;
>  
> +	/*
> +	 * Deep Sleep0 mode is currently functional only on am437x-gp-evm,
> +	 * am33xx-evm and boneblack family. Hence set the DS0 flag
> +	 */
> +	if (of_machine_is_compatible("ti,am437x-gp-evm") ||
> +	    of_machine_is_compatible("ti,am335x-bone-black") ||
> +	    of_machine_is_compatible("ti,am335x-evm"))
> +		suspend_wfi_flags |= WFI_FLAG_DEEP_SLEEP0;

What about other (out-of-tree) machines which supports DS0 and which
this change would break?

I think this needs to be a blacklist if anything.

Please also expand in the commit message why you think this is needed.

Last, what tree is this against? There's no am43xx_suspend() in
linux-next (and you add compatibles above for am33xx too).

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ