Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3979598pxv; Mon, 19 Jul 2021 13:29:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzozsnmEPuddXywibgRHhTBZWtOgaD7qSsUqaFno7wcGs5hICTtaPhGzb0mNHArDZVsRrFq X-Received: by 2002:aa7:dd8d:: with SMTP id g13mr36659564edv.336.1626726597700; Mon, 19 Jul 2021 13:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626726597; cv=none; d=google.com; s=arc-20160816; b=McMzdnuHQw4aJh7VaU7BXd2NJS6n8hKXsn6iXTZRu/JiGIzc12mPbCbiJlElmtALTf cX4hTreyo2Ol24lpih58HOnwbhSW7dQ2jdHZ92Pvp8rRIsnKJMa2UylL1q8MoI13IOrw PNdrDRTFbKbwStiP5xImXd50/DwtLFNi2jtvBARfXdkRZJ05sylYp+Puj+GLWdeN0kn1 9StM16f+oU0F4dqdxEeiKomBaeG4UGgwgry59aTAwMA58wBCENYZib488xnnEDYAPuzZ qAfEmdP9HbWVM9WaxHhMi2JptRbqS9Ad223f6gXcI4UiqqRx+I5UeTkt/CZ61B9l39IH 0XEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AsVttpaIz6o+7rFOVPCQbe/BzglpTdJrFiNYOm9U9B4=; b=UtaG6DHHBTV/GU9M+u1pGN83ziqQklbcm+9nSmx7fWs51P+n3sUNAmCM+dQcr/BYUh GhGlYORCRUITZkvLc4yFipj8+83QhD0tNP99vc72OwSVqfY8PWeMtJP+1iccWUe3Vdpq dgo+rbh/OPhjbp68VTMCGq8l/2A6HseaVI7+grqNDtqe6IR43ykZph1Lg7O1AjkwRxQv eUlVoRsFi5cFU9xtviw2v0S8T+1cV0sdLHVEAmgHbW6BeeN4bbMtitOXm+d25bPefhJ3 a9EbXl4sb6x6lcws1Y2iGzIjqzIdb/WtbjyRT2WUFe754gZiL4INPE/nw/UY6CPjMSkM 5V/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xwBMdYLc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs3si11935900ejc.368.2021.07.19.13.29.34; Mon, 19 Jul 2021 13:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xwBMdYLc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386188AbhGST0V (ORCPT + 99 others); Mon, 19 Jul 2021 15:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385345AbhGSS5u (ORCPT ); Mon, 19 Jul 2021 14:57:50 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF737C0613A8 for ; Mon, 19 Jul 2021 12:28:02 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id a132so11139545oib.6 for ; Mon, 19 Jul 2021 12:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AsVttpaIz6o+7rFOVPCQbe/BzglpTdJrFiNYOm9U9B4=; b=xwBMdYLctnwna9IrwiJvv/IFdbPquUVCJaJF02XKLjARg7WlxJB/ZVtGmpR6HAwm0B DAlHudRafT5FK7eCPyfAYclwILvV18U9HWuu2hZRtoN9T+Bw77VtgScRYrx1vCdYlljg Iwkn0CtuZQHomiyQ0XeFefYfEq8KrIE0MKe0xvF9Tk4uob+ziMZ5iANeS3APKqwZTqBL TOTExV4mKvdgaUSAOiUfnI2rc3QQ2HFMHuiK4+BzFBTfRyzhtilJeMf7h/0DDv2p1abI MmF7SoQw7rmLOEZyWTtQUX/prQbprT9Gvc3gUPlbBtx+ehl7grqisfervRPvs/PmOmMX ijQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AsVttpaIz6o+7rFOVPCQbe/BzglpTdJrFiNYOm9U9B4=; b=eGe0u0xmd4FX027vypi5X24hNj90KkxnwofXEQ2rZHGwJF/sbJ7/4/y5PxD2Nmwrau H7nX6CyawCDpphpgYVCuHuzKnq/Vy6n1xJzZXIuY+Ey0dH7ejC4s6pyJOpFmxyUPOgV3 TYRaZ0yjfntpEImoWxBaeyxdPGSR/kohZWFV9zVmHBeffVRnG76b/RFIHNPZ/lYrpBcv Qr776EQMb6Y5xJnfZR4W37DLDdTjShOPJKaBM4vuVZgvv883dvueqTlQDu0R0qbForlb e8qIKDkq9toqdPw2qsU1OsUfcWbvxGL/Ag+ALm1XSpCyV2u7ves78hxHOptdPVsHdVyH tZfQ== X-Gm-Message-State: AOAM530I4SolPKyGrwLrGNUq8yoZ3BfFALZe3IAJ88ByXNdjH7WsL07z f1S2iKanLy+5YL/wS6CVPK6pOA== X-Received: by 2002:aca:4406:: with SMTP id r6mr13822205oia.50.1626723365906; Mon, 19 Jul 2021 12:36:05 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id c8sm820849oto.17.2021.07.19.12.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 12:36:05 -0700 (PDT) Date: Mon, 19 Jul 2021 14:36:03 -0500 From: Bjorn Andersson To: John Stultz Cc: lkml , Catalin Marinas , Will Deacon , Andy Gross , Joerg Roedel , Thomas Gleixner , Marc Zyngier , Linus Walleij , Vinod Koul , Kalle Valo , Maulik Shah , Saravana Kannan , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , "open list:GPIO SUBSYSTEM" Subject: Re: [PATCH] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module Message-ID: References: <20210707045320.529186-1-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 19 Jul 14:00 CDT 2021, John Stultz wrote: > On Fri, Jul 16, 2021 at 10:01 PM Bjorn Andersson > wrote: > > On Tue 06 Jul 23:53 CDT 2021, John Stultz wrote: > > > Allow the qcom_scm driver to be loadable as a permenent module. > > > > > > This still uses the "depends on QCOM_SCM || !QCOM_SCM" bit to > > > ensure that drivers that call into the qcom_scm driver are > > > also built as modules. While not ideal in some cases its the > > > only safe way I can find to avoid build errors without having > > > those drivers select QCOM_SCM and have to force it on (as > > > QCOM_SCM=n can be valid for those drivers). > > > > > > Reviving this now that Saravana's fw_devlink defaults to on, > > > which should avoid loading troubles seen before. > > > > > > > Are you (in this last paragraph) saying that all those who have been > > burnt by fw_devlink during the last months and therefor run with it > > disabled will have a less fun experience once this is merged? > > > > I guess potentially. So way back when this was originally submitted, > some folks had trouble booting if it was set as a module due to it > loading due to the deferred_probe_timeout expiring. > My attempts to change the default timeout value to be larger ran into > trouble, but Saravana's fw_devlink does manage to resolve things > properly for this case. > Unfortunately I see really weird things coming out of that, e.g. display on my db845c is waiting for the USB hub on PCIe to load its firmware, which typically times out after 60 seconds. I've stared at it quite a bit and I don't understand how they are related. > But if folks are having issues w/ fw_devlink, and have it disabled, > and set QCOM_SCM=m they could still trip over the issue with the > timeout firing before it is loaded (especially if they are loading > modules from late mounted storage rather than ramdisk). > I guess we'll have to force QCOM_SCM=y in the defconfig and hope people don't make it =m. > > (I'm picking this up, but I don't fancy the idea that some people are > > turning the boot process into a lottery) > > Me neither, and I definitely think the deferred_probe_timeout logic is > way too fragile, which is why I'm eager for fw_devlink as it's a much > less racy approach to handling module loading dependencies. Right, deferred_probe_timeout is the main issue here. Without it we might get some weird probe deferral runs, but either some driver is missing or it settles eventually. With deferred_probe_timeout it's rather common for me to see things end up probe out of order (even more now with fw_devlink finding cyclic dependencies) and deferred_probe_timeout just breaking things. > So if you > want to hold on this, while any remaining fw_devlink issues get > sorted, that's fine. But I'd also not cast too much ire at > fw_devlink, as the global probe timeout approach for handling optional > links isn't great, and we need a better solution. > There's no end to the possible and valid ways you can setup your defconfig and run into the probe deferral issues, so I see no point in holding this one back any longer. I just hope that one day it will be possible to boot the upstream kernel in a reliable fashion. Thanks, Bjorn