Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp16608pxv; Wed, 21 Jul 2021 14:10:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyml8FZ0OBqgYvWjPaZhJfUFfrlq8iFlGoJh5ZxDEiNII2d0j9LM+bOwDSfDAnOLbuy2V2W X-Received: by 2002:a05:6e02:5ad:: with SMTP id k13mr25195230ils.284.1626901850134; Wed, 21 Jul 2021 14:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626901850; cv=none; d=google.com; s=arc-20160816; b=QHS0pxb1s7tAXLCHCjLZ30x7LlAPbJyr5YsAYFsS0MxbChhN05Eua0QKh5BkrlfnSk 5mEDBl/SX+LVazy0M+WkV4THzCqNjwiGQkehRcCvOmNJmwMhl349qCLanCyxwtics6PD pFVWnlw2VDyMBqRq5l37qJ6drjc78PXHNOMlSqSP2bHD/NntRJ/X00v9lNjnHSEhpi8J sJUB3ypIDiqT5osxLgPExnRWxCs8a4RRlgKfUnEbpdF/pNapBbzjc4GDoNy2Q52KhhJg ZjJ1GUz/zEkhzApuaNbPbDE+X4WbjL0fv1XiuGtegJ+RTZf5rPXq1znIxfiLGnmoqEpG YnzA== 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:dkim-signature; bh=UBf2xEk8/8fmvgHkUbAP/1+jhiB7YJMg6Fos6jC4Avk=; b=p8ukqTcHPMfu/jmUdfT2yUlh5C3wItb/2fSiK4MKpBzDLaTAcj3W5Zxu8Wa7amVeBp SRfC35dHL8unT4C4uARYSZGIzTfas73pke19+JrDUym4J/jxpkeLzHcNXXMIJ/mraoL/ rs1uiMiP4oA7/AjvHfgw5pjU+RII+MSfHJYqWEc//jDN7r6IwbcOU8dktkvoMNhodsWj /gCE86hXLgAhlNVMpXN4JqgsMlzFKkYuPWD6rrytnZfTke2o2fIo9wJ8CKWqEic+zBvx HM4V1HsdaDO3WiPgdi1fLGZbYmQ7kAM1r8a+sniZbGPgvVFqARjvk+/79T6yQM60k9LS RwrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=iOswR8bD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 10si27565228ilq.145.2021.07.21.14.10.39; Wed, 21 Jul 2021 14:10:50 -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=@google.com header.s=20161025 header.b=iOswR8bD; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbhGUU2C (ORCPT + 99 others); Wed, 21 Jul 2021 16:28:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbhGUU1u (ORCPT ); Wed, 21 Jul 2021 16:27:50 -0400 Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA31AC0613C1 for ; Wed, 21 Jul 2021 14:08:26 -0700 (PDT) Received: by mail-yb1-xb2a.google.com with SMTP id t186so2356545ybf.2 for ; Wed, 21 Jul 2021 14:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UBf2xEk8/8fmvgHkUbAP/1+jhiB7YJMg6Fos6jC4Avk=; b=iOswR8bDPKPmaXbxSo7LpAdDVia28Nw7iA1NHSB/hQm4djv0jw5Jry1olvb2YDLWDG 4syxrMbOJa3ePkJiCDFub8LMNdCmo8gKJv261PJAx7n/XrKPZryC6RHomlOR2lORPHBq 19QfM45Ce3lWlwQ89vaHLLOQ19Y4YMroc3T75jo5J9zIBLM397xBNisHOL9/Tq6pSRCo iFuE7M1Fbd3/8UqgzRgvapwRQR/BecMCco7lyG5UFSZxT3QMf9TErTmhP+7Lakl6v3Wj 5nUkWuAUuA7SVWshHwa3UhWtZbwWsdrICHmfxHqnSVVsdPU2XQ8RmNBe6MvbTe9zqiOY HkaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UBf2xEk8/8fmvgHkUbAP/1+jhiB7YJMg6Fos6jC4Avk=; b=VNOHEqLYTUpkmIelN+QvDvEWbDUnyedXALBn+0819nOt18w+lzCvxxGENzG2rJALFF wmWyGfe63PpnC0c7Oqhpo6v+4sYQT/h7vNkZu/t00XSAXqXz9koRDJWX1+qJB7DY/mMD ieTObXmVbhQ7UAG2lS5NDRxRo0F47MbJCY8LYKQRHNGEC+IsQy5HP0a8XXtEWwTGbHX+ D/WquAPMgIi6xayDKmqU6JQ69CqmhmSpNpZ3ge1ljd1bXRsFfhi7MP1Z0R0HCa7SM9r+ RkjjLa1f0lqi0Q3P9uqWl+prpAv2CMa8RCs8q3Ln+Wq5d8Daz/dJn77RwCM0nClbfksN tRKA== X-Gm-Message-State: AOAM5339Tk0yXUhX/iduOBHbjorO0xsX1tETR5DD6Zt+NVjzMxuRDMo5 GKRdvF2o5Gxuf834VXp3vevR0Po0IxevIBk740Jurw== X-Received: by 2002:a25:8b91:: with SMTP id j17mr46134726ybl.228.1626901705723; Wed, 21 Jul 2021 14:08:25 -0700 (PDT) MIME-Version: 1.0 References: <20210707045320.529186-1-john.stultz@linaro.org> In-Reply-To: From: Saravana Kannan Date: Wed, 21 Jul 2021 14:07:49 -0700 Message-ID: Subject: Re: [PATCH] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module To: Bjorn Andersson Cc: John Stultz , Greg Kroah-Hartman , lkml , Catalin Marinas , Will Deacon , Andy Gross , Joerg Roedel , Thomas Gleixner , Marc Zyngier , Linus Walleij , Vinod Koul , Kalle Valo , Maulik Shah , Todd Kjos , linux-arm-msm , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2021 at 1:23 PM Bjorn Andersson wrote: > > On Wed 21 Jul 13:00 CDT 2021, Saravana Kannan wrote: > > > On Wed, Jul 21, 2021 at 10:24 AM John Stultz wrote: > > > > > > On Wed, Jul 21, 2021 at 4:54 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Jul 07, 2021 at 04:53:20AM +0000, John Stultz wrote: > > > > > Allow the qcom_scm driver to be loadable as a permenent module. > > > > > > > > This feels like a regression, it should be allowed to be a module. > > > > > > I'm sorry, I'm not sure I'm following you, Greg. This patch is trying > > > to enable the driver to be able to be loaded as a module. > > > > I think the mix up might be that Greg mentally read "permanent module" > > as "builtin"? > > > > "permanent module" is just something that can't be unloaded once it's > > loaded. It's not "builtin". > > > > Afaict there's nothing in this patch that makes it more or less > permanent. The lack of a module_exit() makes it a permanent module. If you do lsmod, it'll mark this as "[permanent]". -Saravana > The module will be quite permanent (in practice) because > several other core modules reference symbols in the qcom_scm module. > > But thanks to a previous patch, the qcom_scm device comes with > suppress_bind_attrs, to prevent that the device goes away from a simple > unbind operation - which the API and client drivers aren't designed to > handle. > > So, it would have been better in this case to omit the word "permanent" > from the commit message, but the change is good and I don't want to > rebase my tree to drop that word. > > Thanks, > Bjorn > > > -Saravana > > > > > > > > > > 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. > > > > > > > > fw_devlink was supposed to resolve these issues and _allow_ code to be > > > > built as modules and not forced to be built into the kernel. > > > > > > Right. I'm re-submitting this patch to enable a driver to work as a > > > module, because earlier attempts to submit it ran into boot trouble > > > because fw_devlink wasn't yet enabled. > > > > > > I worry something in my description made it seem otherwise, so let me > > > know how you read it and I'll try to avoid such confusion in the > > > future. > > > > > > thanks > > > -john