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.6 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 E1BE0C433E0 for ; Wed, 24 Jun 2020 23:23:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4638207DD for ; Wed, 24 Jun 2020 23:23:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="M1wwfU36" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389035AbgFXXXT (ORCPT ); Wed, 24 Jun 2020 19:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbgFXXXR (ORCPT ); Wed, 24 Jun 2020 19:23:17 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C99C0613ED for ; Wed, 24 Jun 2020 16:23:17 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id a3so3364797oid.4 for ; Wed, 24 Jun 2020 16:23:17 -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=dGipXZ9X17I+u12oD4DZ2rzNuQVhucODHVNdBawnSmI=; b=M1wwfU36UoerE5HtEt7AEffn18uiUdtoM8XXl0AWGojXJGk3IpAdJ2M0usNyP93xIJ C4K+tOo4fi/6g4LDkLfnGygf2naXQEjHsl+hfIdob42HpSMDH+RoiClBIpgTZBx++Gwz F071ruwPJDr/lHuDqNMAs+amwuavPxIJt1JaWWxFc3xFISohL1QELXY5uKA9Dywb7DaN A20RNPw7+ZloQGbS1jfx4jB/8WXiwu33UjOTyKHHu0VlWpJLIrtQtLaEzmdXeT9EE5GB owoWOoO1ON0J7TmZDzZtNI5C/NRXNrd0BXcvAjC8iei4HAH1VMd+PspPMOJfibAazSDi 2QXw== 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=dGipXZ9X17I+u12oD4DZ2rzNuQVhucODHVNdBawnSmI=; b=Gpp2xak9voq0mWqK/nhDZquopVmGr2Dj+YP28KWuTj0SjAS9PGJrEwLVWyylB7yf9p N9WfnTyi2hF/Ichx3A0bypvUpivQjFhzBV6SLyhaw4X30QqFA+rzXxcwd4UNeJZYcO1O rVS62scM89GwZcbBinU6gpNladZ28+1Sgd4CAPP2EWGtUGtUnBT5xEaRe70VztNiLYFh Hcpihy2RZl6Ws5kBcdkoPldWI5Ty2XNI4lQ2IgMmvY23NkKu3aFo4G/+K9oRvpnpdK5Z bPiZnMoAHif22uWY80xxuDCT5xuYfMNn+nPOUq4eO++0kEQ7OWb8FNtyhC2WgYdQC4PV d8/w== X-Gm-Message-State: AOAM533a97rOMiD0MiWVeMio944qYXIANkBbuW/olTdtbc3uR9C1qV+e 4hlJPoahzNZtmBoXA5h/CnwYgs8TLoKvhA8b5i5LMw== X-Google-Smtp-Source: ABdhPJx5V5Rup3zninLm3/4nlfZ5WpzvvNUIwQf1nRP1tGt6s55UEoBgS6WnEaNkB6yHnFN0OU4E08/nB8eF6a04daw= X-Received: by 2002:aca:6208:: with SMTP id w8mr126619oib.69.1593040996906; Wed, 24 Jun 2020 16:23:16 -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: Wed, 24 Jun 2020 16:22:40 -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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Jun 22, 2020 at 8:49 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > On Sat, Jun 20, 2020 at 4:33 AM Saravana Kannan wrote: > > 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. > > > > 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); > > ============ > > Thanks, that seems to fix the issue for me, on both affected systems! > Note that this has quite some impact on the order devices are suspended, > but this seems harmless. > > Will try on more systems later... Thanks for testing. Maybe I should just send that change as a patch and see what Greg/Rafael have to say to that. It's a general fix anyway. So, might as well send it out. -Saravana