Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3049510pxk; Sun, 4 Oct 2020 23:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf3X4e4ABusjWDX1CSMqMzoTWMNOHfccS/EsMCsbkNQfeasKGB0GbMiFznbG74FNkJOCVi X-Received: by 2002:a17:906:6005:: with SMTP id o5mr13206185ejj.465.1601877761446; Sun, 04 Oct 2020 23:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601877761; cv=none; d=google.com; s=arc-20160816; b=e8TjpFG+sGv12rC8Zrnawl4NYrW4MBtjxHsyXmLjyzKZUsRYiFpgA/yR1HK1Q0HLiC g3EAQSjhhqv7VsAFVTCgEyE/cebFeuqgfUCU0yyHgQm7ttP0BB0QGRKgMvgv3yEAXZGU iojf+ixLjXH9PJ0qp2SeWfPy0F6vuVMk5d6ORE6sEabsZUeOG39B95djAWQjxPx3TQ6w 0+OXDT6zlPDYJlEigCk8Fc5bOpbD0p5Db2QjSXL8Ln47QDKmnm4KNLiSidnHeHfZ6w9T DyfUOez8gXenGorTorapczmuRcbaeBDddcpy5vOXbtY82xtWdjAfLkbZ+fYh1nYtRVYu 5u+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=vrdM/2wrNsHdYoObDsxyGdJFCClcRDod+TrwzKiL3Wc=; b=C4V39Z0s4k8AxNJezW7GqjeTFtQL0uCVyZXj3khOpqqIBM5KvMRPjZZzFYI1X4fhOC 7woSWrkUzZMImH+W4MydjUTBrTAV2sLcJyVLzA4E8krkUfHfu+Ey1TS61Xc+eJl+vefL oNegMZKBKRm+/0K6xL3ZWS9v/Z7f6BRT2jqVhERn4S7UNRfTcm3O7uzG408AfioXVIeW hyIfdXA6jy/hgcv4jv4SRC3wjPRh23g+libsxbUX0XH5uYqnU93njsMwHmzRFtNFJE1U JaXPAdS9jsMFaxSk5lUp8K1IF/xxOQBCQDc2a3gX+ho8nbMkqpMsO33GJhh1ydU9hX9z fAug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ITfYxu6v; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s19si6267882edx.480.2020.10.04.23.02.18; Sun, 04 Oct 2020 23:02:41 -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=@mg.codeaurora.org header.s=smtp header.b=ITfYxu6v; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725888AbgJEGAd (ORCPT + 99 others); Mon, 5 Oct 2020 02:00:33 -0400 Received: from z5.mailgun.us ([104.130.96.5]:64314 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbgJEGAd (ORCPT ); Mon, 5 Oct 2020 02:00:33 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1601877633; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=vrdM/2wrNsHdYoObDsxyGdJFCClcRDod+TrwzKiL3Wc=; b=ITfYxu6vFjcm1BXP99DDSePq0AUWyKKyj4Owp7rmp02V4TRTwxSk6hrRknpvD3aqkgvE7fMs vXZmFT6MkbEfnMmpRiyv5HbxUXodIEMAgRIGSajcAolceFdmJ9a2rD5roPwlrMp3xWw/xdpi Vb/otmB6bY6i5q3IalT4jriqzz0= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 5f7ab678a03b63d6733cd80d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 05 Oct 2020 06:00:24 GMT Sender: mkshah=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C74B4C433CA; Mon, 5 Oct 2020 06:00:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mkshah-linux.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mkshah) by smtp.codeaurora.org (Postfix) with ESMTPSA id EB40BC433CA; Mon, 5 Oct 2020 06:00:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EB40BC433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=mkshah@codeaurora.org From: Maulik Shah To: agross@kernel.org, bjorn.andersson@linaro.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, ulf.hansson@linaro.org, swboyd@chromium.org, dianders@chromium.org, rnayak@codeaurora.org, ilina@codeaurora.org, lsrao@codeaurora.org, John Stultz , Todd Kjos , Saravana Kannan , Maulik Shah Subject: [RESEND v2 2/2] soc: qcom: rpmh: Allow RPMH driver to be loaded as a module Date: Mon, 5 Oct 2020 11:29:56 +0530 Message-Id: <1601877596-32676-3-git-send-email-mkshah@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1601877596-32676-1-git-send-email-mkshah@codeaurora.org> References: <1601877596-32676-1-git-send-email-mkshah@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Stultz This patch allow the rpmh driver to be loaded as a permenent module. Meaning it can be loaded from a module, but then cannot be unloaded. Ideally, it would include a remove hook and related logic, but the rpmh driver is fairly core to the system, so once its loaded with almost anything else to get the system to go, the dependencies are not likely to ever also be removed. So making it a permanent module at least improves things slightly over requiring it to be a built in driver. Cc: Todd Kjos Cc: Saravana Kannan Cc: Andy Gross Cc: Bjorn Andersson Cc: Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Bjorn Andersson [mkshah: Fix typos in commit message, send after removing _rcuidle trace] Signed-off-by: Maulik Shah Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson --- drivers/soc/qcom/Kconfig | 2 +- drivers/soc/qcom/rpmh-rsc.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 3dc3e3d..892bdc7 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -92,7 +92,7 @@ config QCOM_RMTFS_MEM Say y here if you intend to boot the modem remoteproc. config QCOM_RPMH - bool "Qualcomm RPM-Hardened (RPMH) Communication" + tristate "Qualcomm RPM-Hardened (RPMH) Communication" depends on ARCH_QCOM || COMPILE_TEST help Support for communication with the hardened-RPM blocks in diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index 35a7a50..37969dc 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1018,6 +1019,7 @@ static const struct of_device_id rpmh_drv_match[] = { { .compatible = "qcom,rpmh-rsc", }, { } }; +MODULE_DEVICE_TABLE(of, rpmh_drv_match); static struct platform_driver rpmh_driver = { .probe = rpmh_rsc_probe, @@ -1033,3 +1035,6 @@ static int __init rpmh_driver_init(void) return platform_driver_register(&rpmh_driver); } arch_initcall(rpmh_driver_init); + +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. RPMh Driver"); +MODULE_LICENSE("GPL v2"); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation