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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 36525C433E1 for ; Mon, 22 Jun 2020 15:49:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1A66B2073E for ; Mon, 22 Jun 2020 15:49:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729342AbgFVPtZ (ORCPT ); Mon, 22 Jun 2020 11:49:25 -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-Google-Smtp-Source: ABdhPJyVUFz/In4cnlLRHIolL4alEhLcXovuLEA210Edp2UfV5x+qTGIiJivAxU9OTkdQkDrFPDlwe46o1wzUgjWtl4= 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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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