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: <200912212340.16279.rjw@sisk.pl>
Date:	Mon, 21 Dec 2009 23:40:16 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	pm list <linux-pm@...ts.linux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH 1/5] PM: Make the initcall_debug style timing for suspend/resume complete

On Monday 21 December 2009, Alan Stern wrote:
> On Mon, 21 Dec 2009, Rafael J. Wysocki wrote:
> 
> > From: Rafael J. Wysocki <rjw@...k.pl>
> > 
> > Commit f2511774863487e61b56a97da07ebf8dd61d7836
> > (PM: Add initcall_debug style timing for suspend/resume) introduced
> > basic timing instrumentation, needed for a scritps/bootgraph.pl
> > equivalent or humans, but it missed the fact that bus types and
> > device classes which haven't been switched to using struct dev_pm_ops
> > objects yet need special handling.  As a result, the suspend/resume
> > timing information is only available for devices whose bus types or
> > device classes use struct dev_pm_ops objects, so the majority of
> > devices is not covered.
> > 
> > Fix this by adding basic suspend/resume timing instrumentation for
> > devices whose bus types and device classes still don't use struct
> > dev_pm_ops objects for power management.  To reduce code duplication
> > move the timing code to helper functions.
> 
> A minor complaint...
> 
> > +/**
> >   * device_resume - Execute "resume" callbacks for given device.
> >   * @dev: Device to handle.
> >   * @state: PM transition of the system being carried out.
> > @@ -427,7 +465,7 @@ static int device_resume(struct device *
> >  			error = pm_op(dev, dev->bus->pm, state);
> >  		} else if (dev->bus->resume) {
> >  			pm_dev_dbg(dev, state, "legacy ");
> > -			error = dev->bus->resume(dev);
> > +			error = legacy_resume(dev, dev->bus->resume);
> >  		}
> >  		if (error)
> >  			goto End;
> > @@ -448,7 +486,7 @@ static int device_resume(struct device *
> >  			error = pm_op(dev, dev->class->pm, state);
> >  		} else if (dev->class->resume) {
> >  			pm_dev_dbg(dev, state, "legacy class ");
> > -			error = dev->class->resume(dev);
> > +			error = legacy_resume(dev, dev->class->resume);
> >  		}
> >  	}
> 
> If none of the method callbacks are non-NULL, this won't print 
> anything.  The same is true for device_suspend().
> 
> Now maybe you don't _want_ to print anything in that case, but for
> debugging purposes it could be useful.

I'm going to add that in a separate patch.

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