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: <11279831.fXrrNoqKX2@wuerfel>
Date:	Wed, 23 Apr 2014 17:57:56 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Maxime Ripard <maxime.ripard@...e-electrons.com>, wim@...ana.be,
	dbaryshkov@...il.com, dwmw2@...radead.org,
	linux-sunxi@...glegroups.com, linux-kernel@...r.kernel.org,
	linux-watchdog@...r.kernel.org
Subject: Re: [PATCH 1/5] wdt: sunxi: Move restart code to the watchdog driver

On Wednesday 23 April 2014 17:04:32 Maxime Ripard wrote:
> Most of the watchdog code is duplicated between the machine restart code and
> the watchdog driver. Add the restart hook to the watchdog driver, to be able to
> remove it from the machine code eventually.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>

Acked-by: Arnd Bergmann <arnd@...db.de>


> @@ -181,6 +209,9 @@ static int sunxi_wdt_probe(struct platform_device *pdev)
>  	if (unlikely(err))
>  		return err;
>  
> +	sunxi_restart_ctx = sunxi_wdt;
> +	arm_pm_restart = sun4i_wdt_restart;
> +
>  	dev_info(&pdev->dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)",
>  			sunxi_wdt->wdt_dev.timeout, nowayout);
>  
> @@ -191,6 +222,8 @@ static int sunxi_wdt_remove(struct platform_device *pdev)
>  {
>  	struct sunxi_wdt_dev *sunxi_wdt = platform_get_drvdata(pdev);
>  
> +	arm_pm_restart = NULL;
> +
>  	watchdog_unregister_device(&sunxi_wdt->wdt_dev);
>  	watchdog_set_drvdata(&sunxi_wdt->wdt_dev, NULL);

I think we will eventually want a more sophisticated method of registering
and unregistering reset handlers in order to deal with multiple ways of
triggering reset. For now, your approach seems sufficient.

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