Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5781419imw; Wed, 20 Jul 2022 12:24:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sk7b4VbfwRtNMvG3pAcNJ9xy9iNjVUWl4lWWs3vWXlNGwtv34fSlNYREDuEKkE9WBht1rd X-Received: by 2002:a17:906:3f02:b0:718:bdf7:790d with SMTP id c2-20020a1709063f0200b00718bdf7790dmr37288666ejj.479.1658345059653; Wed, 20 Jul 2022 12:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658345059; cv=none; d=google.com; s=arc-20160816; b=vxlP0oH2BeurM9rfvP8EuEtaYSdQYiOdXM6LCeGKnQNydlz1ha6rYMeJzyBx8vD1B2 QGWMwzxtZD4nTAtgis9fEAhnS3c4JSCng+8dDrRhaPpjpz0r0f6L6kQEqNEtREcTWJ3z hQXwdoRKGdMk+O2tzrqtwZ01AN+93gfKU6CbOdwvs5cgq44L8Crksv2JFIj87bFkfFjW UNvqttvmFNlCyohTxp5Je/1gKj0e3pB/+LzZhRc+Ye2LU3WjnQmpsmOJJnvQaiyNJQRB VyrkLogpqrnbrEwS6wvobED9ooTpTf3MSp48VjGW88i5Qp58iWQseZMdivHuRqUC/mkx fc8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZrLA67cwNZVETS1ZHuCD/RT+6Ux5ZfCBf4rowrb0zk0=; b=h0WSjZ28iIGPOIXZMhvx23zAw1iZPbeF28k90zT6242JXns0NZk6qvLV2qf7YlDT9a cDpNX4Fgx5bSzVzdKs1Om35FUP7QphCq0zd6yJSKp6PrZqKNqLyErprSVhkyjHh73i5k MV59kqd7uSsObCd6bhI1yNsPaZwFhQwA3BSpafZFIjV+iwhYGJHqd70Ej3jXgKjoULpr bgd4eSjZ4/3d9d+MO50zavwgVV2aPxshvGr6VOWz4B/PcMk1UKMrI8rT+MVTx3CImiz7 Ac6fIGOF4uG7UZ/f2vbNc34GZS0IoYLbHsDC2HUV5iDlSnG8DwtWTHCp4isLWDoSIdXo Lziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YT3DmTiy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a17090633c800b0072b21f7a839si1322eja.238.2022.07.20.12.23.54; Wed, 20 Jul 2022 12:24:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YT3DmTiy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232317AbiGTTCN (ORCPT + 99 others); Wed, 20 Jul 2022 15:02:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232335AbiGTTCI (ORCPT ); Wed, 20 Jul 2022 15:02:08 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED29F7391F for ; Wed, 20 Jul 2022 12:02:06 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 75so33720024ybf.4 for ; Wed, 20 Jul 2022 12:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZrLA67cwNZVETS1ZHuCD/RT+6Ux5ZfCBf4rowrb0zk0=; b=YT3DmTiyfkNmNptMHmutH4aCptYOfYRcFG5iGz+vPj1xh91hftwgRZVbF/wRHhgFCW 1yP86FQRWdyvxo3CPjgvnAYFhKYsg4xRdhZAvb8fEmhoefgT03SVJLFYubN1htgW4In8 t6tNVr6ozTt06SPfaEt4t0hjTV1L36J3WR01kFU5ZNbxj6GCZ743km1XpjzuQHn+RR1i jytsYhkdsZViX0r1R/6noErQEJfi5bpHwxr3gD8SgyAPCv7vWZfI56uCK7HWM7r7/PFy SmvPNalQP0Ie215MNTJOK1vcSRgDWta0erJ4se7iwmpkVwf7aKNEFOMppZgPMGsnyAwV GblA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZrLA67cwNZVETS1ZHuCD/RT+6Ux5ZfCBf4rowrb0zk0=; b=v+GzaAlXcQ4b3J54qlZyI1RksBeaQCD5zH1/VjA9aMP3UmbIUxwrYoYjpjwxdRq19M hg5q183FkIb3jczGKLfqQsZfpq9C29Xh4qyuKhKlickzq7P7L1qng+1glls54edQ97sq LrPi0ROzbHqIP4b+oEcbDQn8HVJXzSreQ1qnl52J2AdKkjY4hcutnjKhAF1yBmfpCof0 mcIHLh6qfpbk2uxaGHAsA7euVzOPnfD23VmlCrTnBX9Rxa0c2Jnj0wBf+3jlKp+zNNAD bjYOCsQy6/GHUMtE7cmXO1lhCQSgKpTSZZentbwedEUP8HXGJVxLfvXmadb7Ebv2rUaL 7FDA== X-Gm-Message-State: AJIora/s/TwRJJTfqngH1vI3x7l7R1B6zWf3wPWq68F4vgv6C9MA7uk5 EFZEKxPt8TPI50tWeSiVNMfNSivZgZdEmXSqLzNDPA== X-Received: by 2002:a25:aaa9:0:b0:66e:c6ba:15dd with SMTP id t38-20020a25aaa9000000b0066ec6ba15ddmr37815606ybi.242.1658343726294; Wed, 20 Jul 2022 12:02:06 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-7-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Wed, 20 Jul 2022 12:01:30 -0700 Message-ID: Subject: Re: [PATCH v2 6/9] Revert "driver core: Set default deferred_probe_timeout back to 0." To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Joerg Roedel , Will Deacon , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Linus Walleij , Hideaki YOSHIFUJI , David Ahern , Android Kernel Team , Linux Kernel Mailing List , Linux PM list , Linux IOMMU , netdev , "open list:GPIO SUBSYSTEM" , Wolfram Sang , Linux-Renesas Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 20, 2022 at 10:31 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > On Wed, Jun 1, 2022 at 9:45 AM Saravana Kannan wrote: > > This reverts commit 11f7e7ef553b6b93ac1aa74a3c2011b9cc8aeb61. > > > > Let's take another shot at getting deferred_probe_timeout=10 to work. > > > > Signed-off-by: Saravana Kannan > > Thanks for your patch, which is now commit f516d01b9df2782b > ("Revert "driver core: Set default deferred_probe_timeout > back to 0."") in driver-core/driver-core-next. > > Wolfram found an issue on a Renesas board where disabling the IOMMU > driver (CONFIG_IPMMU_VMSA=n) causes the system to fail to boot, > and bisected this to a merge of driver-core/driver-core-next. > After some trials, I managed to reproduce the issue, and bisected it > further to commit f516d01b9df2782b. > > The affected config has: > CONFIG_MODULES=y > CONFIG_RCAR_DMAC=y > CONFIG_IPMMU_VMSA=n > > In arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dtb, > e6e88000.serial links to a dmac, and the dmac links to an iommu, > for which no driver is available. Thanks for digging into this and giving more details. Is e6e88000.serial being blocked the reason for the boot failure? If so, can you give this a shot? https://lore.kernel.org/lkml/20220701012647.2007122-1-saravanak@google.com/ > Playing with deferred_probe_timeout values doesn't help. This part is strange though. If you set deferred_probe_timeout=1, fw_devlink will stop blocking all probes 1 second after late_initcall()s finish. So, similar to the ip autoconfig issue, is the issue caused by something that needs to be finished before we hit late_initcall() but is getting blocked? > However, the above options do not seem to be sufficient to trigger > the issue, as I had other configs with those three options that do > boot fine. > > After bisecting configs, I found the culprit: CONFIG_IP_PNP. > As Wolfram was using an initramfs, CONFIG_IP_PNP was not needed. > If CONFIG_IP_PNP=n, booting fails. > If CONFIG_IP_PNP=y, booting succeeds. > In fact, just disabling late_initcall(ip_auto_config) makes it fail, > too. > Reducing ip_auto_config(), it turns out the call to > wait_for_init_devices_probe() is what is needed to unblock booting. > > So I guess wait_for_init_devices_probe() needs to be called (where?) > if CONFIG_IP_PNP=n, too? That function just unblocks all devices and allows them to try and probe and then waits for all possible probes to finish before returning. They problem with call it randomly/every time is that it breaks functionality where an optional supplier will probe after a few modules are loaded in the future. I guess one possible issue with the timeout not helping is that once the timeout expires, things are still being probed and nothing is being blocked till they finish probing. I'm trying to have the default config (in terms of fw_devlink, deferred probe behavior, timeouts, etc) be the same between a fully static kernel (but CONFIG_MODULES still enabled) and a fully modular kernel (like GKI). But it might end up being an untenable problem. I'll wait to see what specifically is the issue in this case and then I'll go from there. -Saravana > > --- a/drivers/base/dd.c > > +++ b/drivers/base/dd.c > > @@ -256,7 +256,12 @@ static int deferred_devs_show(struct seq_file *s, void *data) > > } > > DEFINE_SHOW_ATTRIBUTE(deferred_devs); > > > > +#ifdef CONFIG_MODULES > > +int driver_deferred_probe_timeout = 10; > > +#else > > int driver_deferred_probe_timeout; > > +#endif > > + > > EXPORT_SYMBOL_GPL(driver_deferred_probe_timeout); > > > > static int __init deferred_probe_timeout_setup(char *str) > > 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 > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >