Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp180194rdb; Thu, 19 Oct 2023 00:40:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHieMx97CvbUk2pWBerv80HpzaDAsjmRaXsS8YC1yRfcxHzJnENeU5khUg2zlFG5ZeQKcMz X-Received: by 2002:a17:903:449:b0:1c7:3558:721a with SMTP id iw9-20020a170903044900b001c73558721amr1475978plb.58.1697701201114; Thu, 19 Oct 2023 00:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697701201; cv=none; d=google.com; s=arc-20160816; b=JyLcM7ITUPEnXDh6KxeURpouHntGh2GJoUNntRgSrEuk7TTuD0N0PX8u0IXyCtWe0z qYTYydE0LoZy68MyfWdlQ4W8T3a4XEe/ZKj5zybWmtkfMGBAIkSl8tv712vLiG7LCFE2 qIil3I0y6ruuR40/ywA9/my21oEOiU/rmprS/KBAnpI9Vd4ZLOh90mF0xGUexqRqY0yU ZajgtXzYiD2OEXA7Db6gH+UDzxGIEB+se68W9nU/qHn7y4olXSFjX8QDs5GQwrNQutDy zrXqCdFgCX+GVb5aS1gQGYZIIVEJXTcIEE+d+0M4czklgNI9tKC4HOt65jKzw4U3i2jO /99Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=Q8KIEjGFORPA4v1hJqv+INufGzzWNJ6I1zxPFClV42s=; fh=DQuCX7JsgkC5aftTtk2+5Jq/iyvcEVd4XbCyiXLxSNM=; b=XJ9xoYKm7K5jo9Ir+s5KLyu+yWger8ZopfwIx5pKk/y3IwWDJvfNf0fB4s+aQ2H3zl 1BatT/bjjcp6rtC/dIekIVcxKWPA87LlbypoESalRT8ZqTIpUSKKJCpsmCvolx/VE8QI NHgmh87OQh+t3O+2m3GDa67RzysbCuRfDY8e+NVPPwwH9ehDA8zED72ZOT5QYxBg5OZl /IaCmNH07ivp3bUXWofjCV+lY3dx/JPZ2+HJyjJfUaM1GGp9hM50jh+CQGJC14HEODGt io0TZEPgmUJa4R6jg04JxkcIcRRHebeucaRgcwLE0XXzQ1WwoOjaK6rXcu1Vlzmpb1iY CSow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x10-20020a170902ea8a00b001c413905d87si1533650plb.49.2023.10.19.00.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 00:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 29F32821ADB5; Thu, 19 Oct 2023 00:40:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232769AbjJSHjz (ORCPT + 99 others); Thu, 19 Oct 2023 03:39:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235109AbjJSHjt (ORCPT ); Thu, 19 Oct 2023 03:39:49 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D28B513A; Thu, 19 Oct 2023 00:39:45 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id BFBBE24E2A5; Thu, 19 Oct 2023 15:39:42 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 19 Oct 2023 15:39:41 +0800 Received: from [192.168.125.85] (183.27.99.123) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 19 Oct 2023 15:39:40 +0800 Message-ID: Date: Thu, 19 Oct 2023 15:39:40 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 16/22] PCI: microchip: Add event IRQ domain ops to struct plda_event Content-Language: en-US To: Conor Dooley CC: =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Daire McNamara , "Emil Renner Berthing" , Krzysztof Kozlowski , , , , , Paul Walmsley , "Palmer Dabbelt" , Albert Ou , "Philipp Zabel" , Mason Huo , Leyfoon Tan , Kevin Xie References: <20231011110514.107528-1-minda.chen@starfivetech.com> <20231011110514.107528-17-minda.chen@starfivetech.com> <20231018-worrier-sizably-b13023f54b36@spud> From: Minda Chen In-Reply-To: <20231018-worrier-sizably-b13023f54b36@spud> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.99.123] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 00:40:00 -0700 (PDT) On 2023/10/18 19:30, Conor Dooley wrote: > On Wed, Oct 11, 2023 at 07:05:08PM +0800, Minda Chen wrote: >> PolarFire Implements none-PLDA event interrupts. So the whole event >> domain ops can not be re-used. > > IIRC, the reason things are like this is to work around the lack of an > msi controller and are not as a result of changes made to the PLDA IP > by us. > Oh. For this reason that new added interrupts have to add to global events field, not the MSI. I will add this to commit messages. Thanks >> PLDA event domain ops instances will be implemented >> in later patch. > > Acked-by: Conor Dooley > > Thanks, > Conor. > >> >> Signed-off-by: Minda Chen >> --- >> drivers/pci/controller/plda/pcie-microchip-host.c | 9 ++++++--- >> drivers/pci/controller/plda/pcie-plda.h | 1 + >> 2 files changed, 7 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c >> index fca1520d56c9..2825c1f5563d 100644 >> --- a/drivers/pci/controller/plda/pcie-microchip-host.c >> +++ b/drivers/pci/controller/plda/pcie-microchip-host.c >> @@ -811,13 +811,15 @@ static const struct plda_event_ops mc_event_ops = { >> }; >> >> static const struct plda_event mc_event = { >> + .domain_ops = &mc_event_domain_ops, >> .event_ops = &mc_event_ops, >> .request_event_irq = mc_request_event_irq, >> .intx_event = EVENT_LOCAL_PM_MSI_INT_INTX, >> .msi_event = EVENT_LOCAL_PM_MSI_INT_MSI, >> }; >> >> -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 = port->dev; >> struct device_node *node = dev->of_node; >> @@ -831,7 +833,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port) >> } >> >> port->event_domain = 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); >> @@ -930,7 +933,7 @@ static int plda_init_interrupts(struct platform_device *pdev, >> return -EINVAL; >> } >> >> - ret = plda_pcie_init_irq_domains(port); >> + ret = plda_pcie_init_irq_domains(port, event->domain_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/controller/plda/pcie-plda.h >> index 6571a4befac9..080932cbe8c4 100644 >> --- a/drivers/pci/controller/plda/pcie-plda.h >> +++ b/drivers/pci/controller/plda/pcie-plda.h >> @@ -129,6 +129,7 @@ struct plda_pcie_rp { >> }; >> >> 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); >> -- >> 2.17.1 >>