Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2863170ybt; Mon, 22 Jun 2020 08:51:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxEVzBO9Ou9/9WGWtx8TZRIyd1xaV3cWDzp01wRb29LXQ59O+YLPzHRx7xucj6Aa1LBG6E X-Received: by 2002:aa7:d28d:: with SMTP id w13mr17757671edq.336.1592841113038; Mon, 22 Jun 2020 08:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592841113; cv=none; d=google.com; s=arc-20160816; b=rXBzYpeTdH6DE2qeklmYpPNLVxEtHuzROUz//cPDJiyqHP4pMQbCb75mUr2tPVakcU VRyJc6hBM32K2QGSjbH0q9quWlbsnk9bGS30fYkuEVXMb+KuJxjBc9lub6Eqq63Xg7iy 2tFUGMQCRkRB5PZp18Z79Ub/3KSrIceJhw79fjMMUoKaYkcii3yjRuj1i+cEKIfFEWXV oP71db3lLHXAMRS06a3yR6rn0CNMXqjki6zXfVeV9VpW0slR66Cd7gt9qAFMg07ZjWY/ XCAg6A1Nw5dQq4Fozzjjr+kGErqO1pdYX8MSkPq3ng7KLFSI3W/j5Re24Ujxqz5NU0Yj PY2Q== 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; bh=ukHKRXuBbPQ+hCHp8ZkdpCwZxoKqRm4bkB6SlAMSyts=; b=Ena6r1PQkxRmmxjG8Jduzcgu5+5EDXvpZk2G+KJw17xvxnh1SCFg/5d+GI4STlLRKk BQuGiP7RXNbxNTSRszBKrG76U/6nKJmB2oVBV9DFBStuSrbUbWnrnfMQZXF25STmGhNj Y759srBYCrXiyV1Uauy6/QY2guWIFGX+2dkkaEDB46BCsgiQ8fW9zi9yc+/Kc2S69jzi ZnH90cLaIENV04YCmVyhJmhlyyGKY0HVnskFp+Ua4dPgqmQTX9EQ4aeYhF+zweEVPMHG mtccx5sI9IDRhiIxbFpZKZcSvh/GLsBGqM6jY4GmKpCEQx4Bkww2JgbW+rlJsfcVgTzL Ktsg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg13si8734823ejb.266.2020.06.22.08.51.30; Mon, 22 Jun 2020 08:51:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729439AbgFVPt0 (ORCPT + 99 others); Mon, 22 Jun 2020 11:49:26 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:42264 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbgFVPtZ (ORCPT ); Mon, 22 Jun 2020 11:49:25 -0400 Received: by mail-ot1-f67.google.com with SMTP id t6so13408054otk.9; Mon, 22 Jun 2020 08:49:24 -0700 (PDT) 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=ukHKRXuBbPQ+hCHp8ZkdpCwZxoKqRm4bkB6SlAMSyts=; b=INgfEx/Ox65qHBF2f2NKQt1uc/q5M9MQyJEXraXilxZsnR2p63v95aQDFUg2lt4BOe wsVUgsYQihmF5uVltxwEpzEX7kmV12CrsxaVatYko5nZk+g1WRhfF/kBycqXDhEYB1gw XhPdnD6a6mXHZOQdbXbG7rMpkj2edullhoN0KdWB4T0DcxXfT5feK8GtvW6u+yzHROtF cTk0q1zyt9mLiuHgkubaajG16nftVdM4gqhC9lj/WU+Tx/OfvBlieZX6NilOlDIKgw6q Wv9ASm+62Iw2FcRFVvfRBy8tHLh7yn9W8EMvZh6W+uegbMglLVFAFOPpua2faISK0HRP UiVg== X-Gm-Message-State: AOAM5302uTANwsXB1tjuT+A7/FS3CtcSetVQO3zxZAshistlTalWjFRs +U9GHRwMeWIu6iHr0k7r2g1ctvpNS6v8oezAp/E= X-Received: by 2002:a9d:62c2:: with SMTP id z2mr14189823otk.145.1592840964455; Mon, 22 Jun 2020 08:49:24 -0700 (PDT) MIME-Version: 1.0 References: <20200515053500.215929-1-saravanak@google.com> <20200515053500.215929-5-saravanak@google.com> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 22 Jun 2020 17:49:13 +0200 Message-ID: Subject: Re: [PATCH v1 4/4] of: platform: Batch fwnode parsing when adding all top level devices To: Saravana Kannan 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 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... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds