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:	Mon, 2 May 2011 11:53:15 +0200 (CEST)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	"Koul, Vinod" <vinod.koul@...el.com>
cc:	linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org,
	Dan Williams <dan.j.williams@...el.com>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <damm@...nsource.se>
Subject: Re: [PATCH 2/2] dmaengine: shdma: add runtime- and system-level
 power management

On Mon, 2 May 2011, Koul, Vinod wrote:

> On Mon, 2011-05-02 at 11:04 +0200, Guennadi Liakhovetski wrote:
> > On Mon, 2 May 2011, Koul, Vinod wrote:
> > 
> > > On Fri, 2011-04-29 at 19:09 +0200, Guennadi Liakhovetski wrote:
> > > > This patch extends and fixes runtime power management in the shdma
> > > > driver to support powering down the DMA controller and adds support
> > > > for system-level suspend and resume.
> > > > 
> > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@....de>
> > > > ---
> > > >  drivers/dma/shdma.c |   68 +++++++++++++++++++++++++++++++++++++++++++++++++++
> > > >  drivers/dma/shdma.h |    1 +
> > > >  2 files changed, 69 insertions(+), 0 deletions(-)
> > > > 
> > > 
> > > >  
> > > > +static int sh_dmae_runtime_suspend(struct device *dev)
> > > > +{
> > > > +	return 0;
> > > > +}
> > > Don't you need to initialize you device on resume...????
> > 
> > Hm, yes, but this is suspend... Resume is below. Sorry, I probably don't 
> > understand your question.
> Opps, my question was for empty suspend. Dont you need to power off you
> device.

Powering down and up is performed by platform / domain hooks. I only need 
to reset the hardware on wakeup. An empty .runtime_suspend() is needed by 
the sh-mobile specific rtpm, at least by the version, that I have, because 
otherwise the device status will not be changed and the resume will not be 
called.

> > > > +
> > > > +static int sh_dmae_runtime_resume(struct device *dev)
> > > > +{
> > > > +	struct sh_dmae_device *shdev = dev_get_drvdata(dev);
> > > > +
> > > > +	return sh_dmae_rst(shdev);
> > > > +}
> > > > +
> > > > +#ifdef CONFIG_PM
> > > This should be removed...
> > 
> > You mean, these functions just won't be called, but this way we save a 
> > couple of bytes if PM is not set, don't we?
> I meant you dont need to have this, PM is usually part of core options
> which ppl enable nowadays. Do you run with PM disabled?

I actually do, but maybe that's not a very important argument. So, if the 
only difference is a couple of kilobytes in the kernel size, then maybe we 
can just keep it always enabled. There are no other side-efects to it, 
right?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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