Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5742813imw; Wed, 20 Jul 2022 11:33:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tBJgZpKECXny0z4/Blkquv5WiD++RjKwwkkJxC0YTVF/pMV08fX4P4rqu4NDt5XGRVe54h X-Received: by 2002:a17:907:7292:b0:72f:d76:b243 with SMTP id dt18-20020a170907729200b0072f0d76b243mr22232685ejc.230.1658342028340; Wed, 20 Jul 2022 11:33:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658342028; cv=none; d=google.com; s=arc-20160816; b=hkjOlHfr7Cltp4xUEINdO5FWiwFrqTfhxWc6zz9fNYkM9iraUK6GnBV5u70p3Ojv+E Qx6rJvPVxZJfe02mTFR7EH2hParZDum7OfJtRmjWZI3iGoaSbOsNFYSv2QnKKVD6EMhl lPN1hMN/MKjW2j/m31pofe0BA1CejAc8ZXbLrmaUhfrgxcNB7Obsa3xDrRXsdvump91v VvcFRdTuy1KiAaBTmsFR2tuiPHgja10K5ANMVZffMmszujd1s8jUTzYDwmfW69oiESkd oBvA5jcdFSpNTycpDPpnBxeMeqaZXaUUGHt8/a6Eeql9QwuJE8TlZP/jZB0Qqwi27k0g 92cA== 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; bh=u6J3sgJghVNNrzVGnT5K48UuGJ4l1PbhybPRZEBzs0E=; b=FIPf7g/nPpOgZ9ru8CTaVStvmefYNkvJfCd1qTGAqEBZREOzSa/yDgMhz50yLrjkat 44eoBO3xHitn1zwwc1D4GLCKzGQ4Bo0l7ZSEALXKSEx3FG+6pKmlxsnz/scL1TUG7Io2 e6i6BV9yZcPfDIXVSlbZgOajSwvNhzbAGba/xQvVb6KKMXKkRb7BLFrg/YlHMfppyTOe nkYbMFoSxBQ25ll7jyLpDaf57d8X0vR++HH/+5sMvmDXZZYOEf5PUUzByDgB0LRG0ATS BqEb0T1LvBU5vpesDYPaAdAoapD7IYZuVXaUaV0ijuc7ikLpoc2x85ICsv09VBnobuKF sQZg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf3-20020a1709077f0300b0072ab4b5ffdcsi29461245ejc.96.2022.07.20.11.33.22; Wed, 20 Jul 2022 11:33:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241268AbiGTRh0 (ORCPT + 99 others); Wed, 20 Jul 2022 13:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241392AbiGTRhV (ORCPT ); Wed, 20 Jul 2022 13:37:21 -0400 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A9FF5D0F3; Wed, 20 Jul 2022 10:37:20 -0700 (PDT) Received: by mail-ot1-f41.google.com with SMTP id g20-20020a9d6a14000000b0061c84e679f5so12002675otn.2; Wed, 20 Jul 2022 10:37:20 -0700 (PDT) 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=u6J3sgJghVNNrzVGnT5K48UuGJ4l1PbhybPRZEBzs0E=; b=3KqcPs8xLw9RVr8PUyvtV2BZDB18UdZi7DJO5dwMB7xlPfXLK++8KO7r7rUp1VZp4y P26d2KVGg1lC062cvS8kLuw7gtiiGlYG2OcRrmh3BaxCuhXEeJhnDcvzHybXZIdIbF86 wp55/cvRZZrAVKxu7VFNT30/YO7vVureOHIrw5oAmV3YKaVqYhejqnJEwxYMqLqmIKEE hJclyHhD/90cAjGOKBMSiS4Tn+7O1jcxx1Drcvw4ydbMlStBDZ51hqy+7oE9G8GEEe9o E1al7c/nNL23JYS4hZoXo4sr+CG2VOHwTsKcIFTtWHbtFDyejLErNoupPdNMSQ7Cxy59 td+A== X-Gm-Message-State: AJIora8R9Z089RLwM8LxcYEf481RIP8kV3qRNgkyPUPGmv/Kyw8RC6aG qbQAmHqXSX4WyBaTEDQu3LZoT604SOffBg== X-Received: by 2002:a05:6830:268c:b0:618:5cc0:417d with SMTP id l12-20020a056830268c00b006185cc0417dmr15965672otu.196.1658338639544; Wed, 20 Jul 2022 10:37:19 -0700 (PDT) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com. [209.85.210.50]) by smtp.gmail.com with ESMTPSA id j21-20020a4a7515000000b0043565888e72sm7175234ooc.2.2022.07.20.10.37.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Jul 2022 10:37:19 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id by10-20020a056830608a00b0061c1ac80e1dso14651380otb.13; Wed, 20 Jul 2022 10:37:19 -0700 (PDT) X-Received: by 2002:a05:6902:701:b0:66e:a06d:53d7 with SMTP id k1-20020a056902070100b0066ea06d53d7mr36038192ybt.604.1658338272504; Wed, 20 Jul 2022 10:31:12 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> <20220601070707.3946847-7-saravanak@google.com> In-Reply-To: <20220601070707.3946847-7-saravanak@google.com> From: Geert Uytterhoeven Date: Wed, 20 Jul 2022 19:31:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 6/9] Revert "driver core: Set default deferred_probe_timeout back to 0." To: Saravana Kannan 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=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 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. Playing with deferred_probe_timeout values doesn't help. 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? > --- 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