Message ID | 20180524175024.19874-9-robh@kernel.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2527446lji; Thu, 24 May 2018 10:51:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq94hhWxua7tI+9lZXZRShBGPx/SXhCYpn5edIo6yIpGKcpqhRzu4mSQudaQthbn8EQS5zg X-Received: by 2002:a17:902:a585:: with SMTP id az5-v6mr8338463plb.79.1527184289919; Thu, 24 May 2018 10:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527184289; cv=none; d=google.com; s=arc-20160816; b=HXE22DAsP+MI/OlRjrm6EigRlISYDh/LFeWYJ2ZEtvGqeBIoPkdb6Io8Do7pTagqlp kKFBEjTZa4HgV87V2C4IlEM0oqIhdhESKn+x0pPx03bYAGMNgZZGNpSZPDsWj+7J6LfA T5RZkdP9+xWL8PIZsTpL3H6i2ou26xKZ0k3BgX3spLarZJWOejrlXKWkrB3HxG2nGfRo YuuE8uLuHizSMtAcJNyxvPIjrnx2l2YNQellljHs125w7fD6cJN7VAAXxZCMifBF4kd9 4bllKEFedLRQ1117i3zs0IC3/6csmzTDSuCtGcmSP0PCJaztJS2mmFmcTs3n9qM/zHlr CSSg== 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=BvRrGxva8JQZfW/TQXjlF4GuHF38rp1PtXOtm01GC9o=; b=iOjIYH0AD/8dqlLjM0x4q8OkMDTEHP7Vg+d/NeBqtT5h20TNC9Px7r9ZykMhbP9ZKt 8B7NkpMwzvO+r1iF3L3IwCQFEY8lroxecGeVpbDvR8Ir4gnlVbBi1pbLcIwVzmboE+lb F1U2nYSpqV/gsverCR+j0MP2vRt4CCgvsRjJfa+Irie5ueDRlsaw5L11zcmcbJWrMMVY T+uWzoFQy1lE3/pw3rjVYB7UIMIYaUJovWqWtf0tWgzMTg5ViMw4soLlzAyQ7InhCSsr UTMm18IIIeHESi6SCEtuwAE9naHFiN9J6sEVOmpMGtNdk2fkNvCHEHNeWYCc86/tXRSJ KOyQ== 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12-v6si6252019pgc.134.2018.05.24.10.51.29; Thu, 24 May 2018 10:51:29 -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 S1031912AbeEXRv1 (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 30 others); Thu, 24 May 2018 13:51:27 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:37045 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031361AbeEXRut (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 24 May 2018 13:50:49 -0400 Received: by mail-yb0-f193.google.com with SMTP id i13-v6so904340ybl.4; Thu, 24 May 2018 10:50:49 -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=BvRrGxva8JQZfW/TQXjlF4GuHF38rp1PtXOtm01GC9o=; b=QIWC18boPCigm/R033PrXKgXEXRjYSDudRViRJ42rorTmjbCk5Ou2M9W3b6/xdYYHc 9k1EEfpUcwBriK3YytYrkYP+W2f7GCjlBy+IorSRB+bPw2KLqYrm/1OIcDQwprgHAvm0 vwlTATMKkQM1mtvQS+8zy5DIiID2IAs/lkHOlQhWnH5kOrQionjgX/MhuZJetdZhY6E7 T0Df9hp70ljU20pfxr66DAvpw/WUEcihxOXb/C5w2I7wRn9Kbd5ghI6MPzzF61MYQB6g HcxadywtGdCXN9y9SMZk+MSo91f3FrFzvZYz+flAH7tka1VpY05+nsK+gSVHnbOlVwQ/ RG2Q== X-Gm-Message-State: ALKqPwcWCB1usMigXfswiwqYq5QAVG8d7fBDVY6H3olPF8EDPF8bO1hw DC5oPunQkPyrjFWo52+4BQ== X-Received: by 2002:a25:ba08:: with SMTP id t8-v6mr4883791ybg.468.1527184248995; Thu, 24 May 2018 10:50:48 -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 v73-v6sm9183814ywa.92.2018.05.24.10.50.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 10:50:48 -0700 (PDT) From: Rob Herring <robh@kernel.org> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Linus Walleij <linus.walleij@linaro.org>, Alexander Graf <agraf@suse.de>, Bjorn Andersson <bjorn.andersson@linaro.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Kevin Hilman <khilman@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, Joerg Roedel <joro@8bytes.org>, Robin Murphy <robin.murphy@arm.com>, Mark Brown <broonie@kernel.org>, Frank Rowand <frowand.list@gmail.com> Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, boot-architecture@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>, linux-pm@vger.kernel.org Subject: [PATCH v2 8/8] PM / Domains: Stop deferring probe at the end of initcall Date: Thu, 24 May 2018 12:50:24 -0500 Message-Id: <20180524175024.19874-9-robh@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524175024.19874-1-robh@kernel.org> References: <20180524175024.19874-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[v2,1/8] driver core: make deferring probe after init optional
|
expand
|
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 1ea0e2502e8e..6398cf786e6a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -2218,7 +2218,7 @@ int genpd_dev_pm_attach(struct device *dev) 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_init_done(dev, true); } dev_dbg(dev, "adding to PM domain %s\n", pd->name);
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" <rjw@rjwysocki.net> Cc: Kevin Hilman <khilman@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <len.brown@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> --- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0