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: <20220925173729.GA1763764@roeck-us.net>
Date:   Sun, 25 Sep 2022 10:37:29 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     "Alice Guo (OSS)" <alice.guo@....nxp.com>
Cc:     m.felsch@...gutronix.de, wim@...ux-watchdog.org,
        shawnguo@...nel.org, s.hauer@...gutronix.de, festevam@...il.com,
        kernel@...gutronix.de, linux-imx@....com,
        linux-watchdog@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/7] watchdog: imx7ulp: Move suspend/resume to noirq
 phase

On Thu, Aug 25, 2022 at 04:32:50PM +0800, Alice Guo (OSS) wrote:
> From: Anson Huang <Anson.Huang@....com>
> 
> The i.MX7ULP's watchdog is enabled by default when out of reset, so the
> resume callback which is to disable watchdog should be called earlier
> to avoid unexpected timeout, move suspend/resume callback to noirq phase.
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>
> Signed-off-by: Alice Guo <alice.guo@....com>
> Reviewed-by: Jacky Bai <ping.bai@....com>
> Tested-by: Peter Chen <peter.chen@....com>
> Tested-by: Li Jun <jun.li@....com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
> 
> Changes for v2:
>  - none
> 
>  drivers/watchdog/imx7ulp_wdt.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
> index 922b60374295..014f497ea0dc 100644
> --- a/drivers/watchdog/imx7ulp_wdt.c
> +++ b/drivers/watchdog/imx7ulp_wdt.c
> @@ -255,7 +255,7 @@ static int imx7ulp_wdt_probe(struct platform_device *pdev)
>  	return devm_watchdog_register_device(dev, wdog);
>  }
>  
> -static int __maybe_unused imx7ulp_wdt_suspend(struct device *dev)
> +static int __maybe_unused imx7ulp_wdt_suspend_noirq(struct device *dev)
>  {
>  	struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev);
>  
> @@ -267,7 +267,7 @@ static int __maybe_unused imx7ulp_wdt_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int __maybe_unused imx7ulp_wdt_resume(struct device *dev)
> +static int __maybe_unused imx7ulp_wdt_resume_noirq(struct device *dev)
>  {
>  	struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev);
>  	u32 timeout = imx7ulp_wdt->wdd.timeout * WDOG_CLOCK_RATE;
> @@ -286,8 +286,10 @@ static int __maybe_unused imx7ulp_wdt_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static SIMPLE_DEV_PM_OPS(imx7ulp_wdt_pm_ops, imx7ulp_wdt_suspend,
> -			 imx7ulp_wdt_resume);
> +static const struct dev_pm_ops imx7ulp_wdt_pm_ops = {
> +	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx7ulp_wdt_suspend_noirq,
> +				      imx7ulp_wdt_resume_noirq)
> +};
>  
>  static const struct of_device_id imx7ulp_wdt_dt_ids[] = {
>  	{ .compatible = "fsl,imx7ulp-wdt", },
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ