From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FCAF3612E0 for ; Thu, 5 Feb 2026 09:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770283064; cv=none; b=PDDcGLonTN0rMpXLqPkHBOHO2N9nJfYDYK8qysHFGvXeWyoDrjMe5jwqrTjTddD9NM6bNAftSv6RiP3+btf1ks56bS3+f9qR3Vc7cFO5PdpiOM1DuijDpmivasClMwVgqmoyadh/oN6PgJqjMi+XYR7J0G7hMLigaVMzogdY6yY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770283064; c=relaxed/simple; bh=Uu3iwtnSe12FeAMYrHwJ1ZUs8PGCx8tivp6As8vHidM=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=FlHszcUMQ3YP1LM0F5Ytz10lorpke8HTnZSWpYhOwt3gxuPnFkFuWbTYpZFm2xie9L8RN1KO50LhCOQp0BgFntD6Rfislrkr7QRSegmeGLHwAalPVDJnNTgzNJrKLmV7x7gTb8bZPYmphPoS+DlX60We4uMwu+eH3rj2NaEyX2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ZUMRRuaw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=K1Qyc3rr; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ZUMRRuaw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="K1Qyc3rr" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6153dsJT2759820 for ; Thu, 5 Feb 2026 09:17:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Vj5L67klWSrPl1mJB2aiEsSv2ae46bDaNXrZmAG0+gM=; b=ZUMRRuawUeZGemVv o1wlVYSQ1NicXrXIDT5wXisCr8iXvtGCQMTJEavu7ssqLshCjSIAYP0nNyYdKREC 9WOPMhvL8zYZ+QgA9qK+B9ESIpKUbS//pj21NIdTieSnMBU+G4ebDVVRLSGzwhon JsUMtedYYV+R04tFK0b56eKqSBV5Zxxm33xegquT1O1C/LAgs5/BnTRGb97Xhxqu Y5at8FHbqI4vTLNmHNwtx33db0mybd7uZLDtnwvCORPPofgp9wTuFoq36Y2Dp/5z uOzAvLITg8/OZnXzY8KCGWvBvM9QTvM4BwB3uhSAqxALlv12xxJW5UZmTQiJrP+V x5/QgA== Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c4jpd13u0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Feb 2026 09:17:43 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-89462dd72a6so25223696d6.1 for ; Thu, 05 Feb 2026 01:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770283062; x=1770887862; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=Vj5L67klWSrPl1mJB2aiEsSv2ae46bDaNXrZmAG0+gM=; b=K1Qyc3rry4uU5NT+iy9AXXnLM2LFritx6xCtPyd2ldCOHSxfAPY4ZMpEOlrDLwp3Vw dn0UUiiONaVzmY8eXQbYo413mjwhOvrt3/rX/2HFLoYxTCg394/mVhderxb9VXl0XCuH 8ZxKl9LHv5VAF7rnG8ldQN66sbTFDt9P6/9sSQzWACqas1lU9A8Tss46M08drnNvhlDd V25n3dUn7AMhqQO8Y1g9KmskeqSiBgJ9O0xdw1opZ+gHREN2Fh3arWyNOMnmWSofiwN4 en5K9KJ7O9az9Q+5cWyDWVKgLwnaSF7gXHOfL8Kwm0IBvx+obGPr3bVqkVSCP0hKjVnh WjrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770283062; x=1770887862; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vj5L67klWSrPl1mJB2aiEsSv2ae46bDaNXrZmAG0+gM=; b=uE+zfLKKFSsSmIFWOY5XS8jwE2AUOTW9CBvtgGmVScAw00fTnAL2AlK/ItzC/0g5BR XvJP7zGjC3g4C8LdDVLDSwlcVcrqwZK+aZKXxMLWNs3rthS5ddPvtTzWF58wq0nRGKwy UYbyG+2um7ZlecFrxlfofA4x+RQsREAd4mJC/TfbGRiRPaLcX9eLdP66XZL75K8dImUm EYJ77VQsD3k0ZAQhKhVx/oj5PkNNRQ18WR/3Jjh5Gl/xlaWmn+aHjR6XJOcNYpbBfgAE QR/KpzlS9dU5keX56Ap9nYD/UIloXeJhTJ6yuHdLS7mNVXc0THranNsKOEB0+HWwviEO +uHQ== X-Forwarded-Encrypted: i=1; AJvYcCX9MjN6OlsfMsaFD20EY9qNsnQtlmdrmcRyUJnaXAJhfB8EYX4FeiMNoGA2CG/ajKduqRZ/kKZn7CQoleY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxzk6fiZO4PfNOCfWET+L9ADevr2VSvDkUcng1ChK7TaXwJhnSA ko2fCC02fSjGy1ibG1LQz5ZezTrnX4b84VuHd5eBKd3d/85M12JOKLRERJaTGezxPu05VU0Xoz8 4birUVftulPI7aOVSnESwXPNsmZSv5dGXMJZfAFirBie/uVDBpoLapBDIx5+Rd9CYXdlK5r2U3R o= X-Gm-Gg: AZuq6aLd3uszG0S/t49pWbMHY6OZkXXEBrhG1H/lbp1STpp05yDr0YIaWIvddTfDiz4 e8m4tQVxw+8/MS07urBery2ylWAC4H3RWdCn0/lwjvWWjjaWvfDyrWxg0csfDD/NgPVk5UU/zAr qtXM1wic3kfFj1C4AFOrl/upDFUaL2mqdIe8up556h8kTeDOEWD2qDaYQeE8Ustu7/re2p01oN7 nqxso8DmmYf58DwdQgZ7ykd4iHXeqFUDe6hAOWq02liW6x6PhQj7qD9/w+8kjcj5wHaeoyUP5Rb RYUjLTAXyMn71eezoiDTdo2ikl12Sg7WB0sQiNBcihffxV4xBSgYlIJpXWLXJMNOsQyiz0aaUP6 kfiM00wnkoyy+1vyCGc56AyDCjHS/64xPRLf8GtORvrOIg1vT28jubHNFbaL0trNpZoYcrIGaK0 vSEP4EFgPb9dzwiSdQyVlsdlJmCgVEaURj0hHYZCYXKem1YAqJgjcsZXDEdpmXvvpbSczt0gPgI h63 X-Received: by 2002:a05:620a:4087:b0:8c6:a723:415a with SMTP id af79cd13be357-8ca2f82e0b6mr735010885a.11.1770283062473; Thu, 05 Feb 2026 01:17:42 -0800 (PST) X-Received: by 2002:a05:620a:4087:b0:8c6:a723:415a with SMTP id af79cd13be357-8ca2f82e0b6mr735009185a.11.1770283061815; Thu, 05 Feb 2026 01:17:41 -0800 (PST) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8e9fcd9e74sm209828766b.9.2026.02.05.01.17.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Feb 2026 01:17:41 -0800 (PST) Message-ID: Date: Thu, 5 Feb 2026 10:17:40 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Hans de Goede Subject: Re: [PATCH] driver core: Make deferred_probe_timeout default a Kconfig option To: Bjorn Andersson Cc: Saravana Kannan , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich , linux-kernel@vger.kernel.org References: <20260204150045.32892-1-johannes.goede@oss.qualcomm.com> Content-Language: en-US, nl In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA1MDA2NyBTYWx0ZWRfX0WWM5/BaZrxp itq65CRIVN38WsTKY1HkqRq0EOt5zUh4X6l5M+j/8eCfrjUeuqkp3qvTRDe4gk4KfRsn8qdbSUs LwAfDU+rGj3uorVoldZ5x6KwgtFQek9IdRjEKaXOAS9cdvNXq0R9DtmCme2nHgCagUqeF2IiWru JshLpRdsNiz9oSAjYwTNCifRbvZ2HV6OyUJs8GdkLCy+uu9/vnAUWoAsJuNzGBXbY17SxaEXlIC bVCnRDu2xu8E49k3DKwKF0PgirWF6mQY0AXLgWZXhmCbD/QUbwJMZmigc+ueEadqd1pUhlK0wjF EEr+Fv492ddDT0hWjyKS7VaUvRfc8wcxGPrQRA33FC9Oktwh8QHFKI4Pp8Kfm/WldBM4PHF44pV XtPqi5NwZpH4X3hKYuzgpRJGlWNWY0xfN6xw3Qc2SkcJOBVzBC/EU7KEiOSpgdjmY5cRMR3oXU/ Nin7ea6hUzwoWakO2jw== X-Proofpoint-GUID: fkMyNViScCNPJfHipS_t1AefJVvfkEjU X-Authority-Analysis: v=2.4 cv=d7j4CBjE c=1 sm=1 tr=0 ts=69846037 cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=5EWwX4rgqVlHYnX0CzkA:9 a=QEXdDO2ut3YA:10 a=pJ04lnu7RYOZP9TFuWaZ:22 X-Proofpoint-ORIG-GUID: fkMyNViScCNPJfHipS_t1AefJVvfkEjU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-05_01,2026-02-05_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 suspectscore=0 adultscore=0 impostorscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602050067 Hi Bjorn, Thank you for your comments. On 4-Feb-26 22:52, Bjorn Andersson wrote: > On Wed, Feb 04, 2026 at 04:00:45PM +0100, Hans de Goede wrote: > > Thanks for posting this, Hans. Let's loop in Saravana and Rob as well, > who looked at this subject in the past. > >> Code using driver_deferred_probe_check_state() differs from most >> EPROBE_DEFER handling in the kernel. Where other EPROBE_DEFER handling >> (e.g. clks, gpios and regulators) waits indefinitely for suppliers to >> show up, code using driver_deferred_probe_check_state() will fail >> after the deferred_probe_timeout. >> >> This is a problem for generic distro kernels which want to support many >> boards using a single kernel build. These kernels want as much drivers to >> be modular as possible. The initrd also should be as small as possible, >> so the initrd will *not* have drivers not needing to get the rootfs. >> > > This problem manifests itself in the upstream kernel, for upstream > developers as well. > > On some platforms we have intermittent boot failures even when testing > with a minimal ramdisk (with kernel modules overlaid), because of the > non-deterministic module loading order it might take time before we get > the providers lined up. > > Another concrete issue is that the Qualcomm CPUfreq driver, while > builtin, on many targets has dependencies on drivers that we today mark > as modules. So with a decently sized ramdisk we don't have time to > unpack the ramdisk before things start breaking. > > > The typical symptom I see when this happens is that the SMMU fails to > find its power-domain provider, in some cases the result is > non-functional system, but often the hardware state ends up such that > the board resets... > >> Combine this with waiting for a full-disk encryption password in >> the initrd and it is pretty much guaranteed that the default 10s timeout >> will be hit, causing probe() failures when drivers on the rootfs happen >> to get modprobe-d before other rootfs modules providing their suppliers. >> > > Indeed, LUKS is a challenge, performing any form of debugging of what > kernel modules you forgot to inject into your ramdisk is impossible. > >> Make the default timeout configurable from Kconfig to allow distro kernel >> configs where many of the supplier drivers are modules to set the default >> through Kconfig and allow using a value of -1 to disable the timeout >> (wait indefinitely). >> > > The timeout mechanism was introduced to handle those exceptional cases > where distro-kernels are missing specific provider drivers but still > want to roll the dice and try to reach a functional user space to allow > the user to correct the issue. > > There's clearly many situations where that will not work in today's > kernel - and as we evolve sync_state, this problem is going to grow. > > > I therefor would, once again, like to see the default value to be "no > timeout". We can keep the option for the user to opt-in to the > alternative (riskier) path. For this the command line option would > suffice, but with a new default. > > > The added Kconfig option of course would allow distributions to set the > default to -1, but I'd prefer to provide a sane default value. AFAICT when this was discussed before opinions on this were divided. Which is why I've chosen to just make the default configurable so that distros/people can chose. I'm not necessarily against making -1 the default, but I think that might be a hard to sell to some people. Note that if this lands you can always make the default -1 for qcom specific defconfigs. Regards, Hans >> Signed-off-by: Hans de Goede >> --- >> Documentation/admin-guide/kernel-parameters.txt | 2 +- >> drivers/base/Kconfig | 9 +++++++++ >> drivers/base/dd.c | 9 ++++----- >> 3 files changed, 14 insertions(+), 6 deletions(-) >> >> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt >> index 1058f2a6d6a8..80d300c4e16b 100644 >> --- a/Documentation/admin-guide/kernel-parameters.txt >> +++ b/Documentation/admin-guide/kernel-parameters.txt >> @@ -1250,7 +1250,7 @@ Kernel parameters >> out hasn't expired, it'll be restarted by each >> successful driver registration. This option will also >> dump out devices still on the deferred probe list after >> - retrying. >> + retrying. Set to -1 to wait indefinitely. >> >> delayacct [KNL] Enable per-task delay accounting >> >> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig >> index 1786d87b29e2..f7d385cbd3ba 100644 >> --- a/drivers/base/Kconfig >> +++ b/drivers/base/Kconfig >> @@ -73,6 +73,15 @@ config DEVTMPFS_SAFE >> with the PROT_EXEC flag. This can break, for example, non-KMS >> video drivers. >> >> +config DRIVER_DEFERRED_PROBE_TIMEOUT >> + int "Default value for deferred_probe_timeout" >> + default 0 if !MODULES >> + default 10 if MODULES >> + help >> + Set the default value for the deferred_probe_timeout kernel parameter. >> + See Documentation/admin-guide/kernel-parameters.txt for a description >> + of the deferred_probe_timeout kernel parameter. >> + >> config STANDALONE >> bool "Select only drivers that don't need compile-time external firmware" >> default y >> diff --git a/drivers/base/dd.c b/drivers/base/dd.c >> index bea8da5f8a3a..e57144aa168d 100644 >> --- a/drivers/base/dd.c >> +++ b/drivers/base/dd.c >> @@ -257,11 +257,7 @@ static int deferred_devs_show(struct seq_file *s, void *data) >> } >> DEFINE_SHOW_ATTRIBUTE(deferred_devs); >> >> -#ifdef CONFIG_MODULES >> -static int driver_deferred_probe_timeout = 10; >> -#else >> -static int driver_deferred_probe_timeout; >> -#endif >> +static int driver_deferred_probe_timeout = CONFIG_DRIVER_DEFERRED_PROBE_TIMEOUT; >> >> static int __init deferred_probe_timeout_setup(char *str) >> { >> @@ -323,6 +319,9 @@ static DECLARE_DELAYED_WORK(deferred_probe_timeout_work, deferred_probe_timeout_ >> >> void deferred_probe_extend_timeout(void) >> { >> + if (driver_deferred_probe_timeout < 0) >> + return; >> + >> /* >> * If the work hasn't been queued yet or if the work expired, don't >> * start a new one. >> -- >> 2.52.0 >>