From patchwork Thu Jun 28 20:43:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 140479 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp28995ljj; Thu, 28 Jun 2018 13:44:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIH7+8tVuZVR1M+Sy9eNlSV+95JsBoHkiIjiKrZR2gtC1UUf3k4tj01Z8I+Ja4Z+ZsRqG+K X-Received: by 2002:a65:4b0f:: with SMTP id r15-v6mr10271062pgq.103.1530218663499; Thu, 28 Jun 2018 13:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530218663; cv=none; d=google.com; s=arc-20160816; b=RXjrgj0nEfyIC12SUYmErvI1Zyh/fRcFECN8htYyCugIFejjK157lGpZqRyGeT32mv BuaBEYUwL3oZbZ9m6csoufgXknmQBbsfofoVk/qQa5DcIl329ncFOnCET33eE58srTRV i5OntLIPRJgtuCCoHxfGiTaLuMK58AjIebJdhYVEgSlexuyaXwAmml9NWLh7MHM3JGMy vZcVjh+WTZ0eZH4HwT1CeFnOPyXJFsnQQo9Ll/9+rxu+i39E4xxggM7YcQ0sdjYRWl8s QoNOcZlSBoC8WDU9sWeRqS063BFPJ6JTmR1FSafE4k9zm0/OMPsOVwyo4BRDOqgXrDHH z/ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7ea/NpiLT+Qun81NMw+9SpKXGfmMaznin7WyFr0FNcM=; b=fl9X4mBFmAUhjRutseCeMmUI6sWrdyKnWCW6VmOAAU8aG1u2DeA7thU/LOnZPLvdO0 KOtTXsDikuUyZRHmD2kA/Ki8t/7WD+M3LP1a9Bq8oAGcZJcSvnof3cGfKhzKKbGKiaQE eaI1CeRDdIYhthF7zSrgCgckM4SsvQyQK0qpIpC7qhAmcggiZYcvjTPiLJwjxSJcypBC 1vcfYi2PUZPikHpgPwPMKGoIfus/eoCCd92ZJ1xSYXtYmnEqu14X5gdV0zzE3Sj8LDpe 3D4t43xYrqA15/gwofCgWCwDd9gw2fDRmNS01lv6UpnGVZEuzzjaaTEdd4bhjdvq7o3D 7JZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si7606959plb.478.2018.06.28.13.44.23; Thu, 28 Jun 2018 13:44:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754956AbeF1UoV (ORCPT + 31 others); Thu, 28 Jun 2018 16:44:21 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33859 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936067AbeF1UoC (ORCPT ); Thu, 28 Jun 2018 16:44:02 -0400 Received: by mail-yw0-f193.google.com with SMTP id n187-v6so2645494ywd.1; Thu, 28 Jun 2018 13:44:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7ea/NpiLT+Qun81NMw+9SpKXGfmMaznin7WyFr0FNcM=; b=fw9UnT/oIrOSIYaa86uTbrnuZ6jmB7IJTYPpS30G2dQO4159Cwe+aB3HemjYRlduiz MHnwu61CjbOBDbjbBrZrAkIH8uTGXAD2jPSBTADBGgsE5F487TT1s4Yuu5v3xL6+pOwS pVu0LZIq+1N7+QMnzH0yWTqISXhp6JW+piUBBMEhkToBsTtYc1yDVNxGzWmgLubJMLEB jdvu3vJ4a2ytzARFoeB5g76q4uVQWMNJIREQQ25naPKvEINyzhhH+UoLS4S15PGFTB1r TOymzbhCHLFcGiKrPvCKkGgrs+GLPu4li369IF6q/W/lXlg1ggnJCty+PZ37nwtFsfNq Jx6g== X-Gm-Message-State: APt69E04ZhENeaxFCDEsSNpE5M6+Rbb5YJ8ntSW57PUtWVbl7yv2NOS8 C7CiYvqrkU/5XZFRD1C7K6Svam0= X-Received: by 2002:a81:4d41:: with SMTP id a62-v6mr1844020ywb.343.1530218642003; Thu, 28 Jun 2018 13:44:02 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id o7-v6sm427913ywi.32.2018.06.28.13.43.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:44:01 -0700 (PDT) From: Rob Herring To: Greg Kroah-Hartman , Linus Walleij , Alexander Graf , Bjorn Andersson , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Joerg Roedel , Robin Murphy , Mark Brown , Frank Rowand Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Pavel Machek , Len Brown , linux-pm@vger.kernel.org Subject: [PATCH v3 6/6] PM / Domains: Stop deferring probe at the end of initcall Date: Thu, 28 Jun 2018 14:43:44 -0600 Message-Id: <20180628204344.13973-7-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628204344.13973-1-robh@kernel.org> References: <20180628204344.13973-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All PM domain drivers must be built-in (at least those using DT), so there is no point deferring probe after initcalls are done. Continuing to defer probe may prevent booting successfully even if managing PM domains is not required. This can happen if the user failed to enable the driver or if power-domains are added to a platform's DT, but there is not yet a driver (e.g. a new DTB with an old kernel). Call the driver core function driver_deferred_probe_check_init_done() instead of just returning -EPROBE_DEFER to stop deferring probe when initcalls are done. Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: Ulf Hansson Cc: Pavel Machek Cc: Len Brown Cc: Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring --- v3: - Update to new function name drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 4925af5c4cf0..8c12213875c6 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2253,7 +2253,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np, mutex_unlock(&gpd_list_lock); dev_dbg(dev, "%s() failed to find PM domain: %ld\n", __func__, PTR_ERR(pd)); - return -EPROBE_DEFER; + return driver_deferred_probe_check_state(dev); } dev_dbg(dev, "adding to PM domain %s\n", pd->name);