Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1910815rdb; Mon, 9 Oct 2023 06:56:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqMoQ9TlBgIUJRnrQV3Fm7r9TMzoO30rFITfZLSdYamxwXPBv9suPzjsTguu9wsjsC8yxU X-Received: by 2002:a05:6358:8809:b0:143:9425:e2b6 with SMTP id hv9-20020a056358880900b001439425e2b6mr16385661rwb.2.1696859786578; Mon, 09 Oct 2023 06:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696859786; cv=none; d=google.com; s=arc-20160816; b=PB8pZxp5DBerfQ3HeTHV0Qf5fTLvd3uRJIWhTsetkJ9UrxZC9YCfpIhb1FBXk0MlZs FLXOtlWPVDtXKouLv6rIBcF2oNfJUlEZHZHpNI9cuIVDtQ4uLyFpICg/EAdtFFZuNMkw XGWL/YKMFPZYTmrjTuyhw6/H2OfWuvV8ercjVJ52snsj+oqbjko7wtsErIokThFECsm+ IWorGFr8mLEmGmUYYkS4LWb7SxI5iLgyDZDxZghCUiIs3KHfET+H7kN16/eFqp3esxOG KGCurHhP25wJF0B5WkaWZvy4U90sbUB7SACqfOO19JBwO2WgD7/A8eM8p7Gpg7kyzR1r SYwg== 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=Yh9U/nla+gR5lR93sUa2ydq76AGiIIrM9CI3RS5OXB4=; fh=zyFAItzoHFGrd2AbUkrdG8zo9j3L2b9vW4Bs4ZsCj6U=; b=K7K623G+Sqw0lQICZJVdprOZsCOGs0gLt4ll+7civollaP3diPwXjXiIzwaExJY2+s N9iCTxkb7GoQMYa3XbgyfyWffxeUTrBAYoXR1tA10gtpM24+fYB8e+kq4uH9L5D/kDb2 SGXKzWR1XgbVY7a9gpNSnu6RjFQhV0VIFi/bM3O7jlpZTLRkAo59TNeDO/4tT7fz/btD EAma98k9frfJHH8kMaEaz5kNL6qs8Sq1BAzcdMe/lJifehfngzvNIJckg6VgjmuH1U+d ANzsZnyVGOx1Xc+TyYr9poEEjLTyK5K8r8aDrhtNvtmY3zoGmusvGxW31wEHV6AW8gRA ecFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=b00qfY6X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id r6-20020a654986000000b0056fbf85c743si9265173pgs.790.2023.10.09.06.56.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 06:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=b00qfY6X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 50394807D42C; Mon, 9 Oct 2023 06:55:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377600AbjJINzW (ORCPT + 99 others); Mon, 9 Oct 2023 09:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377599AbjJINzS (ORCPT ); Mon, 9 Oct 2023 09:55:18 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 098B9B9; Mon, 9 Oct 2023 06:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1696859715; x=1728395715; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gyAyyVVpeXrkP6kYXa6+1hGK7jwZaqHDO7BPBGN0kt4=; b=b00qfY6XO5TgKGsHWnQjxlc/FdjKG7r6j8KR8V7ousu2w38b41zUN7bF 7SjyVFv+xN73AHxxRwIpVlphux0p0oWgGtHXBVoBKz+8ngDOHZfJdDUTY 8PXn1zpY/2K1bswPCARyKsRyK7jmw0NuLaAnreRKll3QSo/YqfotTEIeB AMNWgWxJXDiRP51Ob52NIsbanE7SPLRW6mDGjOrKuSG3k6xUXWvGlupzm OBNhujXilGGyPo3BHa9ZuKZ+SYeF5BarLhhq45/WvJT0oDB/vQ7WWVK9s HrmkIFtKw0VJT+edZHY2MW9SfI8ueFJwbBhRRpEwDnJ1PEYQLonwckcnD Q==; X-CSE-ConnectionGUID: BCeMba0SR+ms7gMS9QQd6g== X-CSE-MsgGUID: BpGGr/ejTDuwg8VyZ1RHXw== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="asc'?scan'208";a="9287955" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 09 Oct 2023 06:55:11 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 9 Oct 2023 06:55:11 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 9 Oct 2023 06:55:08 -0700 Date: Mon, 9 Oct 2023 14:54:47 +0100 From: Conor Dooley To: Minda Chen CC: Daire McNamara , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Emil Renner Berthing , , , , , Paul Walmsley , "Palmer Dabbelt" , Albert Ou , "Philipp Zabel" , Mason Huo , Leyfoon Tan , Kevin Xie Subject: Re: [PATCH v7 14/19] PCI: microchip: Add event IRQ domain ops to struct plda_event Message-ID: <20231009-walk-tranquil-915f1a35f58c@wendy> References: <20230927100802.46620-1-minda.chen@starfivetech.com> <20230927100802.46620-15-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="m6KZbs29qDbK8z+n" Content-Disposition: inline In-Reply-To: <20230927100802.46620-15-minda.chen@starfivetech.com> X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 06:55:51 -0700 (PDT) X-Spam-Level: ** --m6KZbs29qDbK8z+n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Wed, Sep 27, 2023 at 06:07:57PM +0800, Minda Chen wrote: > For register different event domain ops, Add domain_ops > pointer to struct plda_event. Again, the motivation for making this change should, IMO, be mentioned in the commit message. The code change itself seems fine to me. Thanks, Conor. >=20 > Signed-off-by: Minda Chen > --- > drivers/pci/controller/plda/pcie-microchip-host.c | 12 +++++++++--- > drivers/pci/controller/plda/pcie-plda.h | 1 + > 2 files changed, 10 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/= pci/controller/plda/pcie-microchip-host.c > index 875bdb03ce22..49e09d24eb8f 100644 > --- a/drivers/pci/controller/plda/pcie-microchip-host.c > +++ b/drivers/pci/controller/plda/pcie-microchip-host.c > @@ -810,13 +810,15 @@ static const struct plda_event_ops mc_event_ops =3D= { > }; > =20 > static const struct plda_event mc_event =3D { > + .domain_ops =3D &mc_event_domain_ops, > .event_ops =3D &mc_event_ops, > .request_event_irq =3D mc_request_event_irq, > .intx_event =3D EVENT_LOCAL_PM_MSI_INT_INTX, > .msi_event =3D EVENT_LOCAL_PM_MSI_INT_MSI, > }; > =20 > -static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port) > +static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port, > + const struct irq_domain_ops *ops) > { > struct device *dev =3D port->dev; > struct device_node *node =3D dev->of_node; > @@ -830,7 +832,8 @@ static int plda_pcie_init_irq_domains(struct plda_pci= e_rp *port) > } > =20 > port->event_domain =3D irq_domain_add_linear(pcie_intc_node, port->num_= events, > - &mc_event_domain_ops, port); > + ops, port); > + > if (!port->event_domain) { > dev_err(dev, "failed to get event domain\n"); > of_node_put(pcie_intc_node); > @@ -923,13 +926,16 @@ static int plda_init_interrupts(struct platform_dev= ice *pdev, > int irq; > int i, intx_irq, msi_irq, event_irq; > int ret; > + const struct irq_domain_ops *irq_dom_ops; > =20 > if (!event->event_ops || !event->event_ops->get_events) { > dev_err(dev, "no get events ops\n"); > return -EINVAL; > } > =20 > - ret =3D plda_pcie_init_irq_domains(port); > + irq_dom_ops =3D event->domain_ops ? event->domain_ops : &mc_event_domai= n_ops; > + > + ret =3D plda_pcie_init_irq_domains(port, irq_dom_ops); > if (ret) { > dev_err(dev, "failed creating IRQ domains\n"); > return ret; > diff --git a/drivers/pci/controller/plda/pcie-plda.h b/drivers/pci/contro= ller/plda/pcie-plda.h > index 48d7bc471137..122084a3318a 100644 > --- a/drivers/pci/controller/plda/pcie-plda.h > +++ b/drivers/pci/controller/plda/pcie-plda.h > @@ -155,6 +155,7 @@ struct plda_pcie_rp { > }; > =20 > struct plda_event { > + const struct irq_domain_ops *domain_ops; > const struct plda_event_ops *event_ops; > int (*request_event_irq)(struct plda_pcie_rp *pcie, > int event_irq, int event); > --=20 > 2.17.1 >=20 --m6KZbs29qDbK8z+n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZSQGJwAKCRB4tDGHoIJi 0gYuAP9YmN8fqrCvIcDZ84hExyo6Vu/F1CIxaPdG74xU36uKvQEAqgc/XKWQMzpn ynbUEg/q3dgQSY95wyw26lrTyWvOrAg= =jw9K -----END PGP SIGNATURE----- --m6KZbs29qDbK8z+n--