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]
Date:	Thu, 16 Feb 2012 16:28:37 +0530
From:	Viresh Kumar <viresh.kumar@...com>
To:	"rjw@...k.pl" <rjw@...k.pl>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>
Cc:	"baruch@...s.co.il" <baruch@...s.co.il>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Armando VISCONTI <armando.visconti@...com>,
	Shiraz HASHIM <shiraz.hashim@...com>,
	Vipin KUMAR <vipin.kumar@...com>,
	Rajeev KUMAR <rajeev-dlh.kumar@...com>,
	Deepak SIKRI <deepak.sikri@...com>,
	Vipul Kumar SAMAR <vipulkumar.samar@...com>,
	Amit VIRDI <Amit.VIRDI@...com>,
	Pratyush ANAND <pratyush.anand@...com>,
	Bhupesh SHARMA <bhupesh.sharma@...com>,
	"viresh.linux@...il.com" <viresh.linux@...il.com>,
	Bhavna YADAV <bhavna.yadav@...com>,
	Vincenzo FRASCINO <Vincenzo.FRASCINO@...com>,
	Mirko GARDI <mirko.gardi@...com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] gpio/gpio-pl061: No need of thaw and poweroff routines
 for hibernate

On 1/11/2012 3:25 PM, Viresh KUMAR wrote:
> pl061 uses same routines for suspend/freeze/poweroff and resume/thaw/restore.
> We are only saving and restoring register values on these routines.
> 
> During hibernation, in freeze() we take a snapshot of gpio registers. In thaw()
> we don't actually need to restore these registers, as power was never shut down
> till now. Similarly, in poweroff() we don't need to take snapshot of these
> registers again, as it was done during freeze() and by now the image is already
> saved on disk.
> 
> This patch passes poweroff() and thaw() routines as NULL to avoid this extra
> work done.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@...com>
> ---

Hi Grant/Rafael,

Any feedback on the below patch?

>  drivers/gpio/gpio-pl061.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
> index 84ba1dd..45b884b 100644
> --- a/drivers/gpio/gpio-pl061.c
> +++ b/drivers/gpio/gpio-pl061.c
> @@ -430,7 +430,12 @@ static int pl061_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static SIMPLE_DEV_PM_OPS(pl061_dev_pm_ops, pl061_suspend, pl061_resume);
> +static const struct dev_pm_ops pl061_dev_pm_ops = {
> +	.suspend = pl061_suspend,
> +	.resume = pl061_resume,
> +	.freeze = pl061_suspend,
> +	.restore = pl061_resume,
> +};
>  #endif
>  
>  static struct amba_id pl061_ids[] = {


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