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] [day] [month] [year] [list]
Message-ID: <48f8ea58-ffdf-6778-cf7a-4c14d50a1e83@xilinx.com>
Date:   Thu, 30 Jul 2020 07:32:30 +0200
From:   Michal Simek <michal.simek@...inx.com>
To:     Amit Sunil Dhamne <amit.sunil.dhamne@...inx.com>,
        ard.biesheuvel@...aro.org, mingo@...nel.org,
        gregkh@...uxfoundation.org, matt@...eblueprint.co.uk,
        sudeep.holla@....com, hkallweit1@...il.com, keescook@...omium.org,
        dmitry.torokhov@...il.com, michal.simek@...inx.com
Cc:     rajanv@...inx.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, tejasp@...inx.com, jollys@...inx.com,
        Rajan Vaja <rajan.vaja@...inx.com>
Subject: Re: [PATCH] drivers: soc: xilinx: Call InitFinalize from
 late_initcall_sync instead of probe



On 23. 07. 20 1:25, Amit Sunil Dhamne wrote:
> From: Rajan Vaja <rajan.vaja@...inx.com>
> 
> Initially all devices are in power up state. Firmware expect that
> processor should call InitFinalize API once it have requested devices
> which are required so that it can turn off all unused devices and
> save power. From Linux, PM driver calls InitFinalize to inform the
> firmware that it can power down the unused devices. Upon
> InitFinalize() call firmware power downs all unused devices.
> 
> There are chances that PM driver is probed along with or before other
> device drivers. So in that case some of the devices may not be
> requested from firmware which is done by genpd driver. Due to that
> firmware will consider those devices as unused and firmware will power
> down those devices. Later when any device driver is probed, genpd
> driver will ask firmware to power up that device using request node
> API. So for those devices, power transition will be like on->off->on
> which creates unnecessary power glitch to those devices.
> 
> To avoid such unnecessary power transitions and as ideal behavior
> InitFinalize should be called after all drivers are probed. So call
> InitFinalize from late_initcall_sync.
> 
> Signed-off-by: Rajan Vaja <rajan.vaja@...inx.com>
> Signed-off-by: Amit Sunil Dhamne <amit.sunil.dhamne@...inx.com>
> ---
>  drivers/soc/xilinx/zynqmp_power.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/xilinx/zynqmp_power.c b/drivers/soc/xilinx/zynqmp_power.c
> index 31ff49fcd078..fa05cf12d5f3 100644
> --- a/drivers/soc/xilinx/zynqmp_power.c
> +++ b/drivers/soc/xilinx/zynqmp_power.c
> @@ -178,7 +178,6 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
>  	u32 pm_api_version;
>  	struct mbox_client *client;
>  
> -	zynqmp_pm_init_finalize();
>  	zynqmp_pm_get_api_version(&pm_api_version);
>  
>  	/* Check PM API version number */
> @@ -246,6 +245,13 @@ static int zynqmp_pm_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int __init do_init_finalize(void)
> +{
> +	return zynqmp_pm_init_finalize();
> +}
> +
> +late_initcall_sync(do_init_finalize);
> +
>  static const struct of_device_id pm_of_match[] = {
>  	{ .compatible = "xlnx,zynqmp-power", },
>  	{ /* end of table */ },
> 

Applied.
M

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ