From patchwork Wed Apr 10 15:00:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 16037 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01A8C23912 for ; Wed, 10 Apr 2013 15:01:38 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id 11sf851968vbf.5 for ; Wed, 10 Apr 2013 08:01:19 -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=SMtvffRuAZ2lIAkClqAl+4m70aAD+v47RkyUbuUvw3f1ktNO4k78KLxi/7rSQ0ASW6 RjlTjybd4QyDCvtoF4fgjOYUGgoKB2q1dBw/c35eO9/No0K4FirFIbJFMPEqImmRSf2+ +hePcodw+uj3tYdquZrtEDJHHAovBbSZsSLWKa4bS3WMHlE3uctnhDM9+s3wTs3cZjdT sotihxTFfQS3pAIQ6gmD6lezWsUvs+YzlkPvWx8hrUKSzsqMSelyYVpy+EPo1srXcP6Q DWp/MgO/zfzFv9EdvbJsiyzCRZjHt78I3MyFvtJuuz+f0y3jSttX32xEVFv9lSPS2xom Wadg== X-Received: by 10.224.18.132 with SMTP id w4mr1649878qaa.1.1365606079641; Wed, 10 Apr 2013 08:01:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.5.170 with SMTP id t10ls67644qet.19.gmail; Wed, 10 Apr 2013 08:01:19 -0700 (PDT) X-Received: by 10.52.245.6 with SMTP id xk6mr1457077vdc.114.1365606079332; Wed, 10 Apr 2013 08:01:19 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id be4si173324veb.32.2013.04.10.08.01.19 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 10 Apr 2013 08:01:19 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id m16so444499vca.39 for ; Wed, 10 Apr 2013 08:01:19 -0700 (PDT) X-Received: by 10.220.77.138 with SMTP id g10mr1729600vck.69.1365606078759; Wed, 10 Apr 2013 08:01:18 -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 h8csp108883vez; Wed, 10 Apr 2013 08:01:17 -0700 (PDT) X-Received: by 10.15.98.141 with SMTP id bj13mr6299821eeb.29.1365606077537; Wed, 10 Apr 2013 08:01:17 -0700 (PDT) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com [207.126.144.117]) by mx.google.com with SMTP id b4si387972eef.100.2013.04.10.08.00.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 10 Apr 2013 08:01:17 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.117; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKUWV+q4Sr7EmgdjU9ocV9+TPY+E7qegRP@postini.com; Wed, 10 Apr 2013 15:01:17 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 0B80A1F5; Wed, 10 Apr 2013 15:00:58 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9D39B52A4; Wed, 10 Apr 2013 15:00:56 +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 relay2.stm.gmessaging.net (Postfix) with ESMTPS id 467C0A807B; Wed, 10 Apr 2013 17:00:52 +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 17:00:58 +0200 From: Ulf Hansson To: "Rafael J. Wysocki" , Cc: , Rickard Andersson , Ulf Hansson , Kevin Hilman , Alan Stern , Greg Kroah-Hartman Subject: [RESEND PATCH] PM / Runtime: Idle devices asynchronously after probe|release Date: Wed, 10 Apr 2013 17:00:48 +0200 Message-ID: <1365606048-27603-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.10 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlNUCZnRz+vm8MrVvwNCSsfetAe8uTI/fT50yeDtd1Wks6Mf3mybQwFwS2BBezWshcXW3AW X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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);