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 014E237106F for ; Thu, 5 Feb 2026 09:14:33 +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=1770282874; cv=none; b=nLqKVhsDyJhtv2q3h036RffgdjMm5SJVlYPT/pJaVxnsfD4cyQe2ECc3mhohgV7qGVv6m4elXfNiGZ+C/HrH0e/nDbGXCF35GdPVg2c9QrWWMVBOGmXbHheWF076wfaRjVUBVHhrxJtbUHS8cCUPLY7FYHEMRbxD7F8p076R8tE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770282874; c=relaxed/simple; bh=N6f/QJC4czk9GD5sMFBNRwgEuBDPUF4ISDepIEK53bk=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=u3lPay6FVxxM+IrRuj76gb44wjCjMmZMmJpAMuCaNCd8afnDmF6UJhARKRZsoCMORz5nC5WS25KH0zvL/b9HZsYdUrh9atcGZlKe22ykSwHyNfINVaq18zvHEFp4fR+PylQwX6b41hWrUer+xMMlt0vu2zP8niYO7V+AHtJLuV0= 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=FEXBSifc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RWAYFmip; 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="FEXBSifc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RWAYFmip" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6153dkpr2639654 for ; Thu, 5 Feb 2026 09:14:33 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= uamQfFxVpfxdeVSksTXjxbZ/jdEyakAie9+Yxufyv30=; b=FEXBSifcjRKdCE0Y 73iOWxtpegMRjvq4YOavMP3YLQ4AB/eVftzTmUwfpLW6cRm4l93LfLYer7ZI0etP lm0ysgh9Ngt47I2PAYDLTKSVamfD6rCjvdAF7IlWx1GaiyZCvmewdcK2nV9xmdBZ jsAI5ZNvxbcgVog1mpRBynXFihVbzupUnwEEdQ6ahnc4UFUzgeXJxyFCeewYFzYd ozpEqBRtvEnK1DKk/Trqo/v+n8wxUxdmnolq6QzWx8vynrRCBVg61hmCsHPAUut8 91/BTEhyDstmEn4ezjjP/gWUpnxg6y+3GvcMlSC5GUPDfNsIvMI6+JLpK4wVEkhH w6/FLA== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c47qvb5t1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Feb 2026 09:14:33 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8c70b4b53e4so311868285a.1 for ; Thu, 05 Feb 2026 01:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770282872; x=1770887672; 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=uamQfFxVpfxdeVSksTXjxbZ/jdEyakAie9+Yxufyv30=; b=RWAYFmipDTw+M15ALEgyr96Cc+0wJxYiHgHMssd+IQw5njGz09lbC31imL6cdUbFrZ SlMQwZz0kagO3AmaufcQud0sv2V5Hm9URnnwCLIHAWxyJwJGRc+wreHcY6NLdzO5l8jG dr6LO3AN8W4t+g0ohDtErR7FAN8LOGPr8we14X3jUjr2ACR9Ru8DdKZk6dqcRGGcUqFk vtotzzzO0RfmwTDzGdEm0n1wFFtZLrSYCq7dKL30Ngb4FKMXbSRDpYGk7W6X1gJZEWeo FcOcvnwtugz5fl8cr1fgaEtNcWwFL4JZP/72GOgxxuEVl/Qf+isBE9iFDOgSF3XCRvfn n/jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770282872; x=1770887672; 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=uamQfFxVpfxdeVSksTXjxbZ/jdEyakAie9+Yxufyv30=; b=AFKIP+KPz+UG9gqcySX2pybK8rIGRlErB4tdwtl5GBaxJlmMF11vSqJaIbGB2zW7QT LRYEuJXzH8L3E3hq07T6N1ZEqa10erQ7tOn4ChU4kzPSatAbfIXdVaT6S69JdC17dvSt 7wABIbRTLUFiu7DFu3Q+SMZDk/BIoe1FR1VZ/IGrwQHvZTf2PlWPw9e42X9yXq3LUQIG D1czs9jT4XFgptzr7p0hFoTHYMHGTNaM4o801yzw/MPWCaYbEe5AnEKNY4y8RIK0P45S 3WrUB4QdrwH2dO8V59QrG/UnPXUUU9QnWD5KV7Q0tlvRW2u41z0dnIH8MAzBzkJ88SE3 c+2A== X-Gm-Message-State: AOJu0YzRCjpIzJxA9O7OfEesE3o7cTRtLaZKJkZD03qfMGXgryxrxmjw klc/eziA3vMuWZ+iXGd0BJJo53RWTaVTOOSGQy0FEDVwV3TuIpMU9qv+hcl7p9dEL4/M0TlGTNY bHrR8AwPxuzrg2H8gVDJ1/Eu2H1IWCx5S2gkQ4/HVmSfNF/9aAEQUccpy2I1IJA/DtO4= X-Gm-Gg: AZuq6aL2ajptpvWOBqO60FqawWQZAETARyoFzVn6Nb3ODuBeGspzvyhTVGO/ZPlwUip xQL1YFLZHnW/NnJ+Cpw5/Z4bsAVL5vJ7uXA+GgPinenFZBZtpTtBcTj1ny3G7nx0VPxrE3nST7d dypZ3IB5YNRk+iMqFZ+2SY3wLFP9zt4e+SuOfqClhUl1j4wh2UyobeEUdjzas83zm9NOgO5ULR/ YJqjbHQZB5H3KwFs0/GdICvly2hlcijvQvGJkCqwaKOZiREeZr1A5EEuxQb0g/7vkDrLMzk2q4F WDN9mMYZJBQDwuRYsQlqoAr4zu2E5wI1mSD842KAmdQKTaFz2se/fsVNHnj3c+6w+1VxH03DqGq 9IKiR7lCLxaGKfTz4DwyG/Mw/EdcuT3ytoDSIBZs6R/MkdGulSmEIxUPwSRxsbN+S3PI3U40ZaP 7IN4tfpVk1T6aWm2u4jiUymJwx/niUskL6wKfAB9ToL4aDdmQf3SoLuBrJU/IDFi8Pga9zMNayI 7Rk X-Received: by 2002:a05:620a:1910:b0:8b2:87a2:9c60 with SMTP id af79cd13be357-8ca2fa0adddmr758788885a.83.1770282872100; Thu, 05 Feb 2026 01:14:32 -0800 (PST) X-Received: by 2002:a05:620a:1910:b0:8b2:87a2:9c60 with SMTP id af79cd13be357-8ca2fa0adddmr758787085a.83.1770282871576; Thu, 05 Feb 2026 01:14:31 -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-b8e9fd116b7sm210626966b.20.2026.02.05.01.14.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Feb 2026 01:14:31 -0800 (PST) Message-ID: <63fa1288-c472-4cdd-ae64-dbb32fc6574f@oss.qualcomm.com> Date: Thu, 5 Feb 2026 10:14:30 +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: Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich Cc: linux-kernel@vger.kernel.org References: <20260204150045.32892-1-johannes.goede@oss.qualcomm.com> Content-Language: en-US, nl In-Reply-To: <20260204150045.32892-1-johannes.goede@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=GaEaXAXL c=1 sm=1 tr=0 ts=69845f79 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=rQa9Q4xbLdb0ppE2NfkA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: C430in4PNPWhhf4xhWLikZ42S-oiErbL X-Proofpoint-ORIG-GUID: C430in4PNPWhhf4xhWLikZ42S-oiErbL X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA1MDA2NiBTYWx0ZWRfX8xxLydF8B5kN H3H+ZrWO06gndRXRvTpSdOra5XmlmFNtA/hAVPWAJlnwoXVMqsW1edJn8M60YZ8zTYxfPuUKHZz SeSNHIZ9W5+ets+JrIiYGum0YuUquaUERd2zzejZ465T+4ge80XK8TlRcJczjtABDagq/ZZJOit 2X19p0iDf3UBZMe9Qe4JRYTpObbe1NIxVAZoj4TrMLTnrIu+mjmj/xDUXlXD8gwMTEzcKcwECc1 2L6R2QvKY3O9/bLzKCkLU/NoyU9AS5xCV0oK+74fZqQicIeT/TXchG0dEjGUhZIeztARDu/vJek 4Fbfw/7+vTCFZsvduCUrRJfrsBx+07vR+MGpmgGBo4rdy1+Ezj+LFLfJbM5LZ2BatWuacSJApeV dQ4Mh0ZKKivYvItYav5RFQ8nRiOTitSM+NFCBxwyIcCWivNF65s3Ddzoz7npn7Qdi4cg1rVwPFs qSBBGPInOiulYr2knFg== 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 priorityscore=1501 phishscore=0 impostorscore=0 malwarescore=0 spamscore=0 suspectscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602050066 Hi all, On 4-Feb-26 16:00, Hans de Goede wrote: > 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. > > 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. > > 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). > > 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. I just realized that this last bit adding the < 0 check is not necessary. The work never gets scheduled if driver_deferred_probe_timeout < 0 so the existing "if (cancel_delayed_work(&deferred_probe_timeout_work))" check is enough to not re-schedule in this case. I'll drop this for v2. Note I'm waiting with sending a v2 for a bit on case there are more remarks. Regards, Hans