Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2756407ybt; Tue, 16 Jun 2020 14:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU3H+dicM8AShm6qsZ2ZZUsZLBHhWRhrWFIP+29B1P0NdUC4piKSvNoNia0axGMGDpP5+T X-Received: by 2002:a17:906:af62:: with SMTP id os2mr4538102ejb.345.1592342711137; Tue, 16 Jun 2020 14:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592342711; cv=none; d=google.com; s=arc-20160816; b=RKKzbGVrUkuKVeycPDqaoRJ2Hb400AF1CYjHYc/ILb2eAM4u9ggHYD+9O3U/spV5E8 SgwFWmdzFZEuP9PnHQ0OtDYQHnSgHBb1gRQ2ANvgYscsMGGqTZYwrY37r1On9C06F5J4 rrAxMjZZAu3hipjLUXbR4/cnPeDdrLdigaHbL7qtHz2Caex3xM8C7eLZaXdyNJbBSjUz Svo5A4Vv07jcXe/R0Xl4BxEC7MaNs+zrBJ6WDpo73VZ3NBQBdFTOiY+mYTEqHevgwDkr d7oedIiBHiY9SyBov1cZz5Em6XkRDBsjUuwzx+qeJ6mEW/isGhv9DZxOlgzr7oXgjczQ BkXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1WTjVtVQHawTUGhoVtzUqLBrhOe6FD5mLMeqvgfDzVg=; b=NOis72LbP9BDHqbHJM5MZFN4Xo771LZNrQbpyehGb9UatGEQg8MLSCQYc6IW1Mz3bN IpE+i4XVY1LZlp7T5L0GdL/4JxRi3JU+rYOCriKLGdZsesniY+bsyUXvhMpaChXB086T P/yPfWdnnI5Rd/3dy1Yw4fO4BLfVkefNYfGrVqQ6WndHPjoeRcr/2Jejjt4Arpds9nXb ODextAgdWxQ8L/Fv66z6xSeSF9MWtZX1VnPNLJ2j2jygoS09nNqj7bopKRudBYdcunhY QrUjm6enRElELss0bgT3b5lthl6QRDxN9iCnhtg3vC9ExEd3M4S46GcWuBDRuW2EEfrk Rzew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M4fPpFWn; 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 b10si11144861edr.286.2020.06.16.14.24.48; Tue, 16 Jun 2020 14:25:11 -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=M4fPpFWn; 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 S1726486AbgFPVWK (ORCPT + 99 others); Tue, 16 Jun 2020 17:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbgFPVWJ (ORCPT ); Tue, 16 Jun 2020 17:22:09 -0400 Received: from mail-oo1-xc41.google.com (mail-oo1-xc41.google.com [IPv6:2607:f8b0:4864:20::c41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6B6AC06174E for ; Tue, 16 Jun 2020 14:22:09 -0700 (PDT) Received: by mail-oo1-xc41.google.com with SMTP id e8so4390437ooi.11 for ; Tue, 16 Jun 2020 14:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1WTjVtVQHawTUGhoVtzUqLBrhOe6FD5mLMeqvgfDzVg=; b=M4fPpFWneE9bnyXRYRY3Mn84h60xJrEkkF9vFW3Q9pcy/KKGQ5UrPvuZ4lWrZQ8/4G 9miARSs02wr9PKZWhq0Vw6Rq72C5RFpxZHumND2rpKJZiRdxXHDsjl2FqMZid6dfz/UR ZTqF6NiyURgd0q+jR3JyBuFd2e7ixojyPqdz7rfY80U0YB0fiS/dBO9rk5IowumDz5NU b8B7GPvsbqH982dU9YW502JFqOwRVTIfs6DlxbTEr/k/c2fKUDh8W+7OHH6ZGAb5JG93 DvToRR1Ge0+fj/RBUEOI35BkFGq8T2tn8aW5tN5iacF3Fi0xZPbHN0D5ACToeRxVulJ9 vusQ== 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=1WTjVtVQHawTUGhoVtzUqLBrhOe6FD5mLMeqvgfDzVg=; b=nMlPSlKtcN+3mboyZ3biESzV8xPcc+VnXEPz/Bd+rw5ZCYBDL0JjVeIjNCK9C4QIN+ Il07cDXtoGuaibN+xF3+tjDFgEmF6Feog6PszhBZLMH9f2TdEkY//fQO4pi96XqWj0GH pq4YZpcmZlZb+AaL7Ysw7A41xyt8rOiI5jsnQEZMzE7NA9WKzHB8liXTqRaJ+TIfpw4Y dIFfBRhqN2dSWCKnJ5LyIc75g/K17HnJwPMEFW1ENE37xI1mGEeVAjO+fMi3B0k+k4hi jSLkOYYUzlEh1Q+Hhpg3fCqbA398J2WNNKgwNf+Nwx8giD+hJCigz8ICBzA7cj7NVbmK lEGw== X-Gm-Message-State: AOAM532Ks+NmYuvnzTvN3D2Ao+sseeh8nciScIG06hW1Ml1rvcq0LT+p Nvad5Mgetw3XaBPHVOhDyhw9EIUF7XOXTcQDJn+TQA== X-Received: by 2002:a4a:94d1:: with SMTP id l17mr4120054ooi.88.1592342528795; Tue, 16 Jun 2020 14:22:08 -0700 (PDT) MIME-Version: 1.0 References: <20200616061338.109499-1-john.stultz@linaro.org> <20200616061338.109499-4-john.stultz@linaro.org> <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> In-Reply-To: <55e5982a-1e73-7013-e02d-5d1d30815fba@codeaurora.org> From: John Stultz Date: Tue, 16 Jun 2020 14:21:55 -0700 Message-ID: Subject: Re: [RFC][PATCH 3/5] irqchip: Allow QCOM_PDC to be loadable as a perment module To: Maulik Shah Cc: lkml , Andy Gross , Bjorn Andersson , Joerg Roedel , Thomas Gleixner , Jason Cooper , Marc Zyngier , Linus Walleij , Lina Iyer , Saravana Kannan , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm , iommu@lists.linux-foundation.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 4:30 AM 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. Thanks, I really appreciate the review! I've made these changes on my side and they'll be included in v2. thanks -john