Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp977015ybt; Wed, 24 Jun 2020 16:24:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTYMnx3YynSwM8DeJLlomBEejy+M+V5800w51K1oDCSgQKAkZEqrjLAKGg/RbTzlVn5HR4 X-Received: by 2002:a50:aacc:: with SMTP id r12mr29010090edc.219.1593041078191; Wed, 24 Jun 2020 16:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593041078; cv=none; d=google.com; s=arc-20160816; b=F1FPkKjR9GOsOTya28AtUbbc0U25urlqdT5R45grJM9n318CoxbRlmiia4gBdBmIy1 XV0WLaciIZ5NGS1wTBs8814MnW3gRGY4GvH/37sJYlwa4co5Z53GxOywZT/iqxMhWNRB KQ5IB2YAUslZH+O6Bnh+4j9QzeQ6OOXjHcwBOEy8Y9KJJCwtizncw3TMmexid5z1LHBQ t7rQcAfJzZH/pNMxX+MGtD8tqFCP43j6TiZc1Hedy1MnsbcdxmfXiPEYWIaEX+IJ4Q/9 TW3ZhnpauW6tvc3ouFqgtJ9a4kHZiG0j2XRjtZCg94ZUaArBnzcw25KYQeEEn3lJFomg YOXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dGipXZ9X17I+u12oD4DZ2rzNuQVhucODHVNdBawnSmI=; b=DqGQFj9JlaJWmzBs/t19V+kg5EPnUAAvlxSNp5FO9zD4p/HP7yU4XZT/vU53JWLM66 55U4PO758F8sCsKY23q4xu2I8Hpk2lOgrdaYbKJqdFbVnh1MnNOUaAFz+LIY5U3Y575c cApNdLXQx6FEe6WM6pFZeJts69toRcDIUpTzC4/h6AJBkD0HaUXtlPBCKBnnLyNClWKW ckxAo2ZsTbixGvErQlABWJRYvsvO9dLhDgNugH5P7ttF8YtAi2R4g6PuYlL5PScQwRB2 lpfiuBQmwJejdGaesMA80mXE2rGQ9KNqmMO61IN+Mh5WetuAeHex5zWiLbwk5a83WQ3L h7Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M1wwfU36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si13754233ejz.362.2020.06.24.16.24.14; Wed, 24 Jun 2020 16:24:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=M1wwfU36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388989AbgFXXXT (ORCPT + 99 others); Wed, 24 Jun 2020 19:23:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388985AbgFXXXR (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 BDCFBC061795 for ; Wed, 24 Jun 2020 16:23:17 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id s21so3334714oic.9 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=gib9GuP+1RJvO4/pjaS2JbnaiFtGVU2pjfGclXlqPt+0gluNXCWstiCJl9knVEwyDp v6Wdz7yQrsxeWc3NUdnUJYWVBjnUkYXKeYzGwKR1pxqo1c/Q3JDYAophOF1EI7/qYIX4 sgNdkQ/R6qL0K9TAiNCDrTMm4rus+/0EGO1utaf81AInsn+0mzWy5uGSERt7tZfiUSor y2I2uxsibPoWTLocfhGXW1sO/3fG1S0Rdd/+NLvlYNIkLOm05xpCCyBOpSfvHAxGAeXv p4YTHW6Whgszt+yMVNGND/kFb1c98nY13UMe+ZXhsMUl7/3rfP/brSO/YC7k34t8et3m ojrw== X-Gm-Message-State: AOAM530vtkxZx43ccGiigNZGpPZygzW5zk1f6VMCjcveZ+p1OQVp0jPD dnqb3tk0dhXgLbzlA0S7xMFMkMgbD+1SGQzLpd4vgA== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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