From patchwork Wed Apr 10 14:45:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 16035 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-ee0-f69.google.com (mail-ee0-f69.google.com [74.125.83.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC5BC23912 for ; Wed, 10 Apr 2013 14:46:14 +0000 (UTC) Received: by mail-ee0-f69.google.com with SMTP id b15sf722059eek.0 for ; Wed, 10 Apr 2013 07:45:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :from:to:cc:subject:date:message-id:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=RD5b6ZOUEEwoiKVWP7ibFfuxrxvS/tWRrFS5BMB3AE4=; b=X+2foxwO1+i5UR/Aavh8aQsrLPYlyVj9+P0P4+zqq6bIVIILMFas0669fX4iSY2F9s m5XmPKTBep9ZIMpJAYhi1Rz+yPeA9JUddOBmTtiFIbaqgth+31Jo5PT37J/tYvKtnlNB Xm6Arbw/ypdOXjQv5g30KNE08Anb1hFoqbPti4nCw+hrFylTksx8YidZGhZM0L5wb5jH w/xb3mUUsydXtDJL3+pW9UAcXlAqfSCk7wK8QR4PmiuGccR+qMnehvdOV/Ub5g21UL/x E6/j2PQ1PYJKJt/0KWjn8rA2GkpJHAmqkp+yeloF9wG21PG52P5CHs0MDpe0lX/F5kJH J/4g== X-Received: by 10.180.11.239 with SMTP id t15mr855022wib.5.1365605154519; Wed, 10 Apr 2013 07:45:54 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.181.11.197 with SMTP id ek5ls1694373wid.0.canary; Wed, 10 Apr 2013 07:45:54 -0700 (PDT) X-Received: by 10.180.87.170 with SMTP id az10mr4073488wib.3.1365605153843; Wed, 10 Apr 2013 07:45:53 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id ck5si70658wjc.140.2013.04.10.07.45.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:45:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id d10so484793vea.28 for ; Wed, 10 Apr 2013 07:45:52 -0700 (PDT) X-Received: by 10.220.161.4 with SMTP id p4mr1747088vcx.32.1365605152152; Wed, 10 Apr 2013 07:45:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp108317vez; Wed, 10 Apr 2013 07:45:51 -0700 (PDT) X-Received: by 10.180.189.205 with SMTP id gk13mr27325907wic.25.1365605150927; Wed, 10 Apr 2013 07:45:50 -0700 (PDT) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com [207.126.144.149]) by mx.google.com with SMTP id t8si331863eeg.70.2013.04.10.07.45.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Apr 2013 07:45:50 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.149; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKUWV7E3c9zvhhaMxx4nZUjlpUrqRoEX2f@postini.com; Wed, 10 Apr 2013 14:45:50 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id CC26D193; Wed, 10 Apr 2013 14:45:29 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8596D50B8; Wed, 10 Apr 2013 14:45:27 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 73D4D24C2E7; Wed, 10 Apr 2013 16:45:21 +0200 (CEST) Received: from steludxu1397.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.279.5; Wed, 10 Apr 2013 16:45:28 +0200 From: Ulf Hansson To: "Rafael J. Wysocki" Cc: , Rickard Andersson , Ulf Hansson , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [PATCH] PM / Runtime: Idle devices asynchronously after probe|release Date: Wed, 10 Apr 2013 16:45:25 +0200 Message-ID: <1365605125-27538-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQk0bdMhlDf16McIuUZxLi4NrTwkUU5hw53qlTRS6PZKMMEkelwuOf8fEI/xUQ8b3irLraHz X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ulf Hansson Putting devices into idle|suspend in a synchronous manner means we are waiting for each device to become idle|suspended before the probe|release is fully done. This patch switch to use the asynchronous runtime PM API:s instead and thus improves the parallelism since we can move on and handle the next device in queue in an earlier phase. Signed-off-by: Ulf Hansson Cc: Kevin Hilman Cc: Alan Stern Cc: Greg Kroah-Hartman --- drivers/base/dd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index bb5645e..35fa368 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -380,7 +380,7 @@ int driver_probe_device(struct device_driver *drv, struct device *dev) pm_runtime_barrier(dev); ret = really_probe(dev, drv); - pm_runtime_idle(dev); + pm_request_idle(dev); return ret; } @@ -428,7 +428,7 @@ int device_attach(struct device *dev) } } else { ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach); - pm_runtime_idle(dev); + pm_request_idle(dev); } out_unlock: device_unlock(dev); @@ -499,7 +499,7 @@ static void __device_release_driver(struct device *dev) BUS_NOTIFY_UNBIND_DRIVER, dev); - pm_runtime_put_sync(dev); + pm_runtime_put(dev); if (dev->bus && dev->bus->remove) dev->bus->remove(dev);