Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp13789pxv; Wed, 21 Jul 2021 14:07:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8URu/Ut8YrnSuWk9yquXRePNtfe6CDGr5+7jSMgw/v1xcqXCuPfnNVvE6QtTNqBhpJOLM X-Received: by 2002:a05:6602:1203:: with SMTP id y3mr21249355iot.192.1626901529360; Wed, 21 Jul 2021 14:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901529; cv=none; d=google.com; s=arc-20160816; b=vYks3IfojojYC75cZu+xv9jkSLsHoMbY2QQoBNNWVsWc4Z+L69M2Hb0HayJAIMhsZU jILVvWTSH4nQQEZV+aZxecCJdI2qU/53L0wPByRqIfkKDdPBqXwGmIFV0vOFYXdHViAd OF1sjh46xUi3o9mc0fbLzaUejMQ3AFHVTT08G73FF1SljQcrtJ7WFdtkSmz5aKaFmOnT FUUDIt3C4vuBnBxK0DHaVX3veJP4g8N3rO3557NanrMEmj63TijFnPW5TDrzvydUJTey 37CEE9y03/N/ogt17SHopMMJ5fKVUuVdug326UiB40ckb1FfPW6gqMA1zGd5hFqCy2zr MCjg== 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=lop2Mo3qaKZQHvdRq+YuqOoaPIzQiwDuhfWOgAOqAZ0=; b=jant3dVd5Q4idbBHHNKGivkZj84FamHO+DUr4D6jU+rT84JBDbPn7eWZEW1io1Jcx8 QOMd4mO7wKrf1si9azACQEUGxF4Ri7XShiiBLA6HeeBynJ39P0ctqSmpKQwQYlA+SC+n RgEF+LoH+4XCw3unbcBwAAEMp51m9BNDGITEr/85WgIfbFyUo3jOwhY0yBQ0w3lu6VNk Dt3qPM6THP2Huno3gvFBbkmV9IrkMaMZLJLQQKlbF48lmGu/5MQGg+ZHOmLsa4nOSMd1 /kQYJaB4ECr5FLbGrAFYbUH5l41kNbInSiLrTVpI5A33BcesFwZjWvnmk80TGEbk4+oG EN4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PB5mPY5G; 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 x14si28232315jab.2.2021.07.21.14.05.17; Wed, 21 Jul 2021 14:05:29 -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=PB5mPY5G; 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 S229786AbhGUTch (ORCPT + 99 others); Wed, 21 Jul 2021 15:32:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhGUTcg (ORCPT ); Wed, 21 Jul 2021 15:32:36 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E0C9C0613C1 for ; Wed, 21 Jul 2021 13:13:12 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id h24-20020a9d64180000b029036edcf8f9a6so3224841otl.3 for ; Wed, 21 Jul 2021 13:13:12 -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=lop2Mo3qaKZQHvdRq+YuqOoaPIzQiwDuhfWOgAOqAZ0=; b=PB5mPY5G2ota/+DFFfxv3JPi5/vJEoUikCFhR6GYPPynTWxryvDVQAjnTtQwa5NC5K 8h+BmifA/rmTHaPIVlCdcglYRQYSXE0+fy4IZ+L5VDB9DeM5MDHAoqM6B0vhSYO3sKGx lHZX3keWuX9nc7XYdQ97FzDGY97MRBs2sYrar6FXMQRafku+SUf0KDpR8t6RDz/m9ME1 7lFJyccSwSSiifWjfHMAIU3w72mDbgnkTh8gBqBut4/IjGpZoYqEydJ/FP68dicuDiq1 6vu2iB76r8IUSdI6oEBE5OOZIzIe9emYP59IsOin4oGebtHd3WUzZX9p/V8zxSlAgbuB cfVQ== 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=lop2Mo3qaKZQHvdRq+YuqOoaPIzQiwDuhfWOgAOqAZ0=; b=CLnjuxQn66a8C5e8MOP4mhYQgnQw8isIM66o26PK9LhybuQPDcLFnA8sClFynlBHwp E2axhyYeomLwgKDa5jK08F700B+9JNmtsMzFckb/kGSuaeKTDrJp51B4q3P1bcd2XG6n fzgVRM+AZOwNJ8mRvPuD8VjatOtxvGCK7m6ZE3IZ6LFBeL5Ll+JilNnPx22ubp7oW61m pqosuwQPG+JUbjUU6iM6MqNjq6vkN7XBhgvH0R3mRTOxSygmuNhrmUb3H2SP2ecYtwPL opMgn/5npl7KBO9F/3WSE1AFSKGhFp34eRGOZ8iZMU1VoDgvxwnIwa61PfOpuP8+NRIT ulyQ== X-Gm-Message-State: AOAM530XYW9jBxe2dJ5vila53f2LwjOKqxzLFvxyrSWyc2cK8onhRVKI fAdUe3m03WW5Cu01SZaq1VLC3A== X-Received: by 2002:a05:6830:34a4:: with SMTP id c36mr14509757otu.57.1626898391420; Wed, 21 Jul 2021 13:13:11 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id b2sm1732793otf.40.2021.07.21.13.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 13:13:10 -0700 (PDT) Date: Wed, 21 Jul 2021 15:13:08 -0500 From: Bjorn Andersson To: Saravana Kannan Cc: John Stultz , lkml , Catalin Marinas , Will Deacon , Andy Gross , Joerg Roedel , Thomas Gleixner , Marc Zyngier , Linus Walleij , Vinod Koul , Kalle Valo , Maulik Shah , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , "open list:GPIO SUBSYSTEM" , Android Kernel Team 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 16:53 CDT 2021, Saravana Kannan wrote: > On Mon, Jul 19, 2021 at 12:36 PM Bjorn Andersson > wrote: > > > > 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? > > > > > > Bjorn, > > I jump in and help with any reports of issues with fw_devlink if I'm > cc'ed. Please feel free to add me and I'll help fix any issues you > have with fw_devlink=on. > Thanks Saravana, unfortunately I've only heard these reports second hand so far, not been able to reproduce them on my own. I appreciate your support and will certainly reach out if I need some assistance. > > > > > > 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. > > Can you please add me to any email thread with the details? I'd be > happy to help. > > First step is to make sure all the devices probe as with > fw_devlink=permissive. After that if you are still seeing issues, it's > generally timing issues in the driver. But if the actual timing issue > is identified (by you or whoever knows the driver seeing the issue), > then I can help with fixes or suggestions for fixes. > > > > 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. > > Again, please CC me on these threads and I'd be happy to help. > > > > > > 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. > > Might not be believable, but I'm hoping fw_devlink helps you meet this goal :) > Sounds good, I hope so too :) Regards, Bjorn