Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6138902iog; Thu, 23 Jun 2022 12:09:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vh/CFMwXPW5Fq+MRzQoHLmC5+o2eFaKzWQj82kncNKvXs12rgB9tUt//UfBrbLAm5kCfwP X-Received: by 2002:a63:7a49:0:b0:40c:ca38:aed7 with SMTP id j9-20020a637a49000000b0040cca38aed7mr8695521pgn.11.1656011364778; Thu, 23 Jun 2022 12:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011364; cv=none; d=google.com; s=arc-20160816; b=Pr2njaGXaUNFNsRL2UX/SWXL7i8HUYQwana9lBJqG5vX1OvMu/pNroxyOKOiSnUCEQ i9TMAEJLyPl64DoqfeOSPLpZByE7/eLKLiQ6+LmfSfkgg1tUCQn5z34LhRrylIWNHZBo JcFDZ+Q6xKFAx1ahiGLEq4IICify2w27xipfjQhho0gz9fofw/E6aNJSHvnuB8BqQYer 4qwzyc3RQ7jauvgD9CPUhtbr0PJ/q+HoQWDCJvsa/Av0wiJWyoOI77Zh28nb3YfBAPEx jfto4wl907gfc3bkoJ9Gm6dD7PmmECETqKsIL3/RUqeOu3gpngLIauQ0hdKA/C3rfh2+ AfRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=QzySQcL24GEYxXoJc82RsC0c2BhGDpj4k4DOkY9xrS0=; b=yd7nbvwFy/pRuviGks/RAdjda6cXXlZ7nt0eqVeQfhNHYALTke6v4IAEsDsPnsoOBe u7sDWFWOJjgp8G4foxyQH+X1KlnN9/TYRcyRvxbf1rVZn2NGSJUB4uYTIeRgjK80aN17 KAZ7KmOahD9JCUwFX6RfVuusvJHvfofDDDWv02OkZcksJV1fmZw7e9w01uZzcZr0oITx +GaCPa7HNWPfX2j+Gn0MOdxy6hfcpeZEDSN6C1tgL54CWZbkjVMb8hPcLBOg3J3wyOvu PPb7EGej0UwE0LrsX/xT8FyP+gn3372jePvN/qaG8pua6V3AK9Rx6jbAk6NNNMR9Vamo xWew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a056a000ac300b0050d932fc7b4si31955080pfl.185.2022.06.23.12.09.11; Thu, 23 Jun 2022 12:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236883AbiFWSQ5 (ORCPT + 99 others); Thu, 23 Jun 2022 14:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236778AbiFWSQg (ORCPT ); Thu, 23 Jun 2022 14:16:36 -0400 Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A06B25DF35; Thu, 23 Jun 2022 10:22:44 -0700 (PDT) Received: by mail-yb1-f173.google.com with SMTP id u9so219638ybq.3; Thu, 23 Jun 2022 10:22:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QzySQcL24GEYxXoJc82RsC0c2BhGDpj4k4DOkY9xrS0=; b=EA9QO/BQU35unKlx6FbkmO5/gPZgmhdZgoPbgFC6ffBaA9VooOcc0BRLOU39xQVF5u oCQBgnLZoYCyzVFx7UIoZDv9EQX6dTDh4Rgq+u/q19CS8XJPMXCMbOzr/wvoN8a+JJEX n+dfZAHFvr9Z2RZB/XL9H/844Gm0m5QrkH2LAFi2Edlk952DPNVmyNwpHEo0zDEgttH/ rh/cvmHqXZv3hq9jo2fuvJWXhzak+RaB6VSTOM7wwmz9+vUeiVyRW9eHndW02UhCqfSG zciotoAlnfZ/mSNthxa1kW0Dqxa+aopjSNJbaqDfEBibkC99qnrZLbTwsBuiL8Fdv7Fv iS+g== X-Gm-Message-State: AJIora8hjXpF/oHWli0PfCcSNJcgeSauYfwdswID16swkOdq45TP3wEt BttImfYagxBaZOWbKf9rxILcTsZ7uMFC93gcX1A= X-Received: by 2002:a05:6902:1141:b0:669:3f2a:c6bb with SMTP id p1-20020a056902114100b006693f2ac6bbmr10551083ybu.365.1656004963776; Thu, 23 Jun 2022 10:22:43 -0700 (PDT) MIME-Version: 1.0 References: <20220623080344.783549-1-saravanak@google.com> <20220623080344.783549-3-saravanak@google.com> <20220623100421.GY1615@pengutronix.de> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 23 Jun 2022 19:22:32 +0200 Message-ID: Subject: Re: [PATCH v2 2/2] of: base: Avoid console probe delay when fw_devlink.strict=1 To: Andy Shevchenko Cc: sascha hauer , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Frank Rowand , Daniel Scally , Heikki Krogerus , Sakari Ailus , Len Brown , peng fan , kevin hilman , ulf hansson , len brown , pavel machek , joerg roedel , will deacon , andrew lunn , heiner kallweit , russell king , "david s. miller" , eric dumazet , jakub kicinski , paolo abeni , linus walleij , hideaki yoshifuji , david ahern , "Cc: Android Kernel" , Linux Kernel Mailing List , Linux PM , "open list:AMD IOMMU (AMD-VI)" , netdev , "open list:GPIO SUBSYSTEM" , Sascha Hauer , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2022 at 6:39 PM Andy Shevchenko wrote: > > On Thu, Jun 23, 2022 at 12:04:21PM +0200, sascha hauer wrote: > > On Thu, Jun 23, 2022 at 01:03:43AM -0700, Saravana Kannan wrote: > > ... > > > I wonder if it wouldn't be a better approach to just probe all devices > > and record the device(node) they are waiting on. Then you know that you > > don't need to probe them again until the device they are waiting for > > is available. > > There may be no device, but resource. And we become again to the something like > deferred probe ugly hack. > > The real solution is to rework device driver model in the kernel that it will > create a graph of dependencies and then simply follow it. But actually it should > be more than 1 graph, because there are resources and there are power, clock and > resets that may be orthogonal to the higher dependencies (like driver X provides > a resource to driver Y). There is one graph, or it wouldn't be possible to shut down the system orderly. The problem is that this graph is generally dynamic, especially during system init, and following dependencies in transient states is generally hard. Device links allow the already known dependencies to be recorded and taken into account later, so we already have a graph for those. The unknown dependencies obviously cannot be used for creating a graph of any sort, though, and here we are in the business of guessing what the unknown dependencies may be IIUC.