From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF75EC433DF for ; Sat, 20 Jun 2020 02:33:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8591022DA9 for ; Sat, 20 Jun 2020 02:33:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="s4CI5rQA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731918AbgFTCd3 (ORCPT ); Fri, 19 Jun 2020 22:33:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731911AbgFTCd2 (ORCPT ); Fri, 19 Jun 2020 22:33:28 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF0FC0613F0 for ; Fri, 19 Jun 2020 19:33:28 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id i74so10231340oib.0 for ; Fri, 19 Jun 2020 19:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2izEUWmO2Z44gqGlokNsKJYCiU6NrD8s4mWVTOtP2bc=; b=s4CI5rQA2oC41KDlMQtutcRiKWu4nTD2gRPf4ZpqQDclSutlsWz1q11wzgg5SpCVrB vpeDt+HymrhzhRDYYUBdo59HdTt0DKIP9S7ovJhlf+iWvlUFTRf8Y71/jf1fFZwEY10e hhAkJVTG412nIzCKVtxkFtzppe88Lq+gKhAMPNOcTZg8cTl/WRpIPw5cnA6PzJdMmkhN 6DsLyIGqhAnVoZ/zZZHo4VTNotbyFjC9sM7ABBV/YYqmwi2Qx+4EvdhqbG81HTkHEOvw 7ZO1lvU7Yf8FccTZzJCLyFSpwHF0yXqadkpxWIwk7X4UEPNRJ9W8kos63kFnqxjfJqOr pfCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2izEUWmO2Z44gqGlokNsKJYCiU6NrD8s4mWVTOtP2bc=; b=Uq4eqMwskIp2C7fQyR3batfPn7m1zjwGxPTzw+LgK++htY2ad3/GgKIWE6Nrm0llaY WVLS65siL/k5o/wcQEKHxQmB0eh4SurSrGFDcd8k8UMifXJmJMkUEFWBUubgH2nz5+xa 0LKiYKra3HiMfPkyjf/ZxspQYjwhht1VWM81d/p9KkHqEz9dcSGIW88GcvGQsLMpfOFs gQ9Tiuk1ouj7jhkLrISIMEV8joNNB6GnRy/uxixSqhMotiDzTvE73Tt0ZHAv16JDq3kf tvQMZxaFJhfuOuqqK7esXh0etZrHlaUZOTaT5JT41Ixi4o3BnEmO0wdITWgbWNfD96rB j+3A== X-Gm-Message-State: AOAM5320NDIwKhzSPdNIu3bTEDb7XRNLHBhPGjNP/B4IQovwLXskeQzk AsoihGqO5vNUiQQYSOuqmF6UM1Df5LUqGFIv8ZgKCw== X-Google-Smtp-Source: ABdhPJzwMAGZETqCd57hDnIimD39x1lQ0rN7GHIBUMMaKf6xyMUxmekPnQIwoFszeceaY/MtRbLUsNoHsJe1HYXdiw8= X-Received: by 2002:aca:35d4:: with SMTP id c203mr5227824oia.30.1592620407638; Fri, 19 Jun 2020 19:33:27 -0700 (PDT) MIME-Version: 1.0 References: <20200515053500.215929-1-saravanak@google.com> <20200515053500.215929-5-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 19 Jun 2020 19:32:51 -0700 Message-ID: Subject: Re: [PATCH v1 4/4] of: platform: Batch fwnode parsing when adding all top level devices To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Frank Rowand , Len Brown , Android Kernel Team , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ACPI Devel Maling List , Ji Luo , Linux-Renesas , Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Fri, Jun 19, 2020 at 1:07 PM Saravana Kannan wrote: > > I think instead of deferred_probe_work_func() moving the device to the > end of the dpm_list, I think the device probing successfully is what > should move it to the end of the dpm_list. That way, the dpm_list is > actually ordered by when the devices become functional and not the > random order in DT or random probe order which can get pretty > convoluted with multiple deferred probes. This feels right and will > make suspend/resume more robust against DT ordering -- but I'm not > sure what other wide ranging impact this has for other platforms. Geert, If you want to play around with a potential fix to test my hypothesis, I think it's just adding this one line to driver_bound(): ============ klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices); device_links_driver_bound(dev); +device_pm_move_to_tail(dev); device_pm_check_callbacks(dev); ============ -Saravana