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: <20150814184344.GG10748@sirena.org.uk>
Date:	Fri, 14 Aug 2015 19:43:44 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Sagar Dharia <sdharia@...eaurora.org>
Cc:	gregkh@...uxfoundation.org, bp@...e.de, poeschel@...onage.de,
	treding@...dia.com, gong.chen@...ux.intel.com,
	andreas.noever@...il.com, alan@...ux.intel.com,
	mathieu.poirier@...aro.org, daniel@...ll.ch, oded.gabbay@....com,
	jkosina@...e.cz, sharon.dvir1@...l.huji.ac.il, joe@...ches.com,
	davem@...emloft.net, james.hogan@...tec.com,
	michael.opdenacker@...e-electrons.com, daniel.thompson@...aro.org,
	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	kheitke@...ience.com, mlocke@...eaurora.org, agross@...eaurora.org,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH V3 6/6] slim: qcom: Add runtime-pm support using
 clock-pause feature

On Mon, Aug 03, 2015 at 12:59:50AM -0600, Sagar Dharia wrote:

> +	if (cur_clk_state == SLIM_CLK_ENTERING_PAUSE) {
> +		if (txn->mc != SLIM_MSG_MC_BEGIN_RECONFIGURATION &&
> +		    txn->mc != SLIM_MSG_MC_RECONFIGURE_NOW &&
> +		    txn->mc != SLIM_MSG_MC_NEXT_PAUSE_CLOCK)
> +			return -EBUSY;
> +	} else {
> +		int ret = pm_runtime_get_sync(dev->dev);
> +
> +		if (ret < 0) {

This is taking a runtime PM reference whenever we're about to start a
transfer - this is the sort of thing I was talking about expecting the
framework to do rather than individual drivers.

> +			pm_runtime_set_suspended(dev->dev);
> +			dev_err(dev->dev, "runtime-pm vote failed:%d\n", ret);
> +			return ret;

If the get failed there should be no need to suspend the device, the
get() should leave us in a sensible state...

> +static int msm_slim_suspend(struct device *dev)
> +{
> +	int ret = 0;
> +
> +	if (!pm_runtime_enabled(dev) ||
> +		(!pm_runtime_suspended(dev))) {
> +		dev_dbg(dev, "system suspend");
> +		ret = msm_slim_runtime_suspend(dev);
> +	}
> +	if (ret == -EISCONN) {
> +		/**
> +		* If the clock pause failed due to active channels, there is
> +		* a possibility that some audio stream is active during suspend
> +		* We dont want to return suspend failure in that case so that
> +		* display and relevant components can still go to suspend.
> +		* If there is some other error, then it should prevent
> +		* system level suspend
> +		*/

Best mention that this is for the modem use case for Android's suspend
model since it's really surprising to see.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ