From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0B59C433E0 for ; Tue, 16 Jun 2020 17:05:43 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36CE420882 for ; Tue, 16 Jun 2020 17:05:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="FkOCg3jr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36CE420882 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CB37D2667D; Tue, 16 Jun 2020 17:05:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 821ROuuxDKbI; Tue, 16 Jun 2020 17:05:41 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id F0FF42660E; Tue, 16 Jun 2020 17:05:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D614CC07FF; Tue, 16 Jun 2020 17:05:40 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1576AC016E for ; Tue, 16 Jun 2020 16:08:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F252C87973 for ; Tue, 16 Jun 2020 16:08:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id czi_0AP8TpOl for ; Tue, 16 Jun 2020 16:08:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail29.static.mailgun.info (mail29.static.mailgun.info [104.130.122.29]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E3B5C864D0 for ; Tue, 16 Jun 2020 16:08:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592323713; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=MD92WfPRgR/jkFLJAG2o5YhCjEHFWsLDGTiEaMXk+O4=; b=FkOCg3jrSoeEwwXkjdDSYpYEXJqQ5jRWYeY57st2azLsMsgFzpk1yeygtEotOCcgB3o1pnW4 H37EJUyfXBkd6FL/Mqb8VinjtH43qj4Ffju599sXmviTfM7ypt2PDuiY7GMp7pvOVMdOCLfL +PpO5BeAArou7ABtRXy84sQR0jk= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI3NDkwMCIsICJpb21tdUBsaXN0cy5saW51eC1mb3VuZGF0aW9uLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n13.prod.us-east-1.postgun.com with SMTP id 5ee8ee75356bcc26ab0ffc16 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 16 Jun 2020 16:08:21 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D5CECC4339C; Tue, 16 Jun 2020 16:08:20 +0000 (UTC) Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ilina) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2594BC433CA; Tue, 16 Jun 2020 16:08:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2594BC433CA 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=none smtp.mailfrom=ilina@codeaurora.org Date: Tue, 16 Jun 2020 10:08:18 -0600 From: Lina Iyer To: Maulik Shah Subject: Re: [RFC][PATCH 3/5] irqchip: Allow QCOM_PDC to be loadable as a perment module Message-ID: <20200616160818.GD12942@codeaurora.org> References: <20200616061338.109499-1-john.stultz@linaro.org> <20200616061338.109499-4-john.stultz@linaro.org> <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> X-Mailman-Approved-At: Tue, 16 Jun 2020 17:05:39 +0000 Cc: Jason Cooper , Saravana Kannan , Marc Zyngier , lkml , Bjorn Andersson , linux-gpio@vger.kernel.org, iommu@lists.linux-foundation.org, Andy Gross , John Stultz , Greg Kroah-Hartman , Thomas Gleixner , Linus Walleij , linux-arm-msm@vger.kernel.org, Todd Kjos X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Jun 16 2020 at 05:30 -0600, Maulik Shah wrote: >Hi, > >On 6/16/2020 11:43 AM, John Stultz wrote: >>Allows qcom-pdc driver to be loaded as a permenent module > >typo: permanent > >>Also, due to the fact that IRQCHIP_DECLARE becomes a no-op when >>building as a module, we have to add the platform driver hooks >>explicitly. >> >>Thanks to Saravana for his help on pointing out the >>IRQCHIP_DECLARE issue and guidance on a solution. >> >>Cc: Andy Gross >>Cc: Bjorn Andersson >>Cc: Joerg Roedel >>Cc: Thomas Gleixner >>Cc: Jason Cooper >>Cc: Marc Zyngier >>Cc: Linus Walleij >>Cc: Lina Iyer >>Cc: Saravana Kannan >>Cc: Todd Kjos >>Cc: Greg Kroah-Hartman >>Cc: linux-arm-msm@vger.kernel.org >>Cc: iommu@lists.linux-foundation.org >>Cc: linux-gpio@vger.kernel.org >>Signed-off-by: John Stultz >>--- >> drivers/irqchip/Kconfig | 2 +- >> drivers/irqchip/qcom-pdc.c | 30 ++++++++++++++++++++++++++++++ >> 2 files changed, 31 insertions(+), 1 deletion(-) >> >>diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >>index 29fead208cad..12765bed08f9 100644 >>--- a/drivers/irqchip/Kconfig >>+++ b/drivers/irqchip/Kconfig >>@@ -425,7 +425,7 @@ config GOLDFISH_PIC >> for Goldfish based virtual platforms. >> config QCOM_PDC >>- bool "QCOM PDC" >>+ tristate "QCOM PDC" >> depends on ARCH_QCOM >> select IRQ_DOMAIN_HIERARCHY >> help >>diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c >>index 6ae9e1f0819d..98d74160afcd 100644 >>--- a/drivers/irqchip/qcom-pdc.c >>+++ b/drivers/irqchip/qcom-pdc.c >>@@ -11,7 +11,9 @@ >> #include >> #include >> #include >>+#include >> #include >>+#include >please move this include in order after of_device.h >> #include >> #include >> #include >>@@ -430,4 +432,32 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent) >> return ret; >> } >>+#ifdef MODULE >>+static int qcom_pdc_probe(struct platform_device *pdev) >>+{ >>+ struct device_node *np = pdev->dev.of_node; >>+ struct device_node *parent = of_irq_find_parent(np); >>+ >>+ return qcom_pdc_init(np, parent); >>+} >>+ >>+static const struct of_device_id qcom_pdc_match_table[] = { >>+ { .compatible = "qcom,pdc" }, >>+ {} >>+}; >>+MODULE_DEVICE_TABLE(of, qcom_pdc_match_table); >>+ >>+static struct platform_driver qcom_pdc_driver = { >>+ .probe = qcom_pdc_probe, >>+ .driver = { >>+ .name = "qcom-pdc", >>+ .of_match_table = qcom_pdc_match_table, > >can you please set .suppress_bind_attrs = true, > >This is to prevent bind/unbind using sysfs. Once irqchip driver module >is loaded, it shouldn't get unbind at runtime. > That is a good point. We probably should do that to RPMH RSC driver as well. >Thanks, >Maulik >>+ }, >>+}; >>+module_platform_driver(qcom_pdc_driver); >>+#else >> IRQCHIP_DECLARE(qcom_pdc, "qcom,pdc", qcom_pdc_init); >>+#endif >>+ >>+MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); >>+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 > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu