Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3702300rdg; Wed, 18 Oct 2023 03:41:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKS1DwxM8rcXgKdIP87rJ9Vqc5nS/G00sdK2Jbbb+TRv58QNpzI9DrTYKPg3BQ8Vf0CiTv X-Received: by 2002:a05:6a21:a5a0:b0:16b:74bb:e57e with SMTP id gd32-20020a056a21a5a000b0016b74bbe57emr4713022pzc.12.1697625718713; Wed, 18 Oct 2023 03:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697625718; cv=none; d=google.com; s=arc-20160816; b=gTrvXzTF4EiFrXwM5OSwWN1wXHXfKf+vI1+RgGbZneFbXP2QF/sLWn6jI7AqyMR39u 7eOj0JEOQ2qJwoa3Z3+UgcREV4YT7llsX/sNh0zFH7tROMaANwqBFQ1dZqjwcyqrPgIq DJTYrR2FAxNgyLx4docxSTtscP70ivSqrdMKJR2Q2FO1ZN/8DSp3ibvz8N3gVqP9uSvC 1ku35c70yYyhM1P+HoKG4yRVhlHQ1VqcYDgA6fE29rI+g35B44imHAuhsivwsT+ZFbvO cOOrQYnXt0zjaCTce1bgTOTB3RzaKCOJiM1LFoL9z5gfo5togqU6Bz93pobNKTNXOHZk vv7w== 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=NtlElAF+FpzXn/XuRtTm5Fbl/bQR6qI/jMBzl8LKUR0=; fh=UwJF0cmN4EbbbJQYNeQBi16R6caNIm1BUmE7y7GO72w=; b=QHyTiwpLllP5AEmUDCfgzPcqqzt8XMPQQvNm3likt+3vC6JpiowJ/T3JHMADnZpePq R6kpAMe9wRjSgZOLRdSrSC1iT8XFN1qrEG2ZUIOT4KBRva66qyZIOYqLsPm8Pu463jnY R7JlmokyF+Xke2QdM71gXekZZMhC33NHj5JO2jHS1kjuVwELm0eKFKD4jEbNmbMUslfM aoReJIHnwUiymaamAiOr+X6dGL8FMUMW95CLgwOX9K6cakWoNj8ey4PcSnZmEs/t8iC8 QK9O+tDBHOBkC1pUnbo3vkisil6RoH08AnDbSBHs9MaD6xoO6KokhBKK165/HjNqf56q rayg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tDZtuWgW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f21-20020a633815000000b00577f4d85fdbsi640037pga.548.2023.10.18.03.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 03:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tDZtuWgW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 58FC9802B171; Wed, 18 Oct 2023 03:41:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235057AbjJRKlu (ORCPT + 99 others); Wed, 18 Oct 2023 06:41:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230414AbjJRKlt (ORCPT ); Wed, 18 Oct 2023 06:41:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4073BB0; Wed, 18 Oct 2023 03:41:47 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D0F8C433C7; Wed, 18 Oct 2023 10:41:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697625706; bh=sFyrtrR928O5YNONsxuEouDQvRY8IpL62l5ARmvnQ5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tDZtuWgWGHcT2MnvPBicnbXZWhpcKOcfBeGcN7UZvFCojB5gZBL4+6tMFkS5bvl0Q RIEg5sn1xLTHy9FWx9oG/cAdbnMh9g9yYbPUsn4x0BRylUoCYhN9jK7RRy3ZgSDmWf 406RkW0ejGk0OmysreiA7xHA2pGRQGUz+frO4KXMZGrXbYQIDEaWvaPIno1HUa4QYd 9DFB5TSYWni6cEyjqgk7u36b9e1X1EM/c4wMDMHHD7laQNq771G7z6Srvdbqso2JEy Ggtk1UqPEHbH6fnOuEq8AqIuCksCBVa6oEUq7Gj0ld2EJOd6bhHSp5n16q5d5lIcsI SrmW+bCoO9HUg== Date: Wed, 18 Oct 2023 11:41:40 +0100 From: Conor Dooley To: Minda Chen Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Daire McNamara , Emil Renner Berthing , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pci@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie Subject: Re: [PATCH v8 06/22] PCI: microchip: Move PCIe host data structure to plda-pcie.h Message-ID: <20231018-defender-moonlit-3d9a06faddcd@spud> References: <20231011110514.107528-1-minda.chen@starfivetech.com> <20231011110514.107528-7-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+ZHf5FLqtzeKhJjg" Content-Disposition: inline In-Reply-To: <20231011110514.107528-7-minda.chen@starfivetech.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 03:41:56 -0700 (PDT) --+ZHf5FLqtzeKhJjg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 11, 2023 at 07:04:58PM +0800, Minda Chen wrote: > Move the common data structures definition to head file for nit: "to a header file so that these data structures" > these data structure can be re-used. >=20 > Signed-off-by: Minda Chen Reviewed-by: Conor Dooley Thanks, Conor. > --- > .../pci/controller/plda/pcie-microchip-host.c | 20 ------------------ > drivers/pci/controller/plda/pcie-plda.h | 21 +++++++++++++++++++ > 2 files changed, 21 insertions(+), 20 deletions(-) >=20 > diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/= pci/controller/plda/pcie-microchip-host.c > index 3dc4d4ca9d0c..261147a0a446 100644 > --- a/drivers/pci/controller/plda/pcie-microchip-host.c > +++ b/drivers/pci/controller/plda/pcie-microchip-host.c > @@ -21,9 +21,6 @@ > #include "../../pci.h" > #include "pcie-plda.h" > =20 > -/* Number of MSI IRQs */ > -#define PLDA_MAX_NUM_MSI_IRQS 32 > - > /* PCIe Bridge Phy and Controller Phy offsets */ > #define MC_PCIE1_BRIDGE_ADDR 0x00008000u > #define MC_PCIE1_CTRL_ADDR 0x0000a000u > @@ -179,23 +176,6 @@ struct event_map { > u32 event_bit; > }; > =20 > -struct plda_msi { > - struct mutex lock; /* Protect used bitmap */ > - struct irq_domain *msi_domain; > - struct irq_domain *dev_domain; > - u32 num_vectors; > - u64 vector_phy; > - DECLARE_BITMAP(used, PLDA_MAX_NUM_MSI_IRQS); > -}; > - > -struct plda_pcie_rp { > - struct device *dev; > - struct irq_domain *intx_domain; > - struct irq_domain *event_domain; > - raw_spinlock_t lock; > - struct plda_msi msi; > - void __iomem *bridge_addr; > -}; > =20 > struct mc_pcie { > struct plda_pcie_rp plda; > diff --git a/drivers/pci/controller/plda/pcie-plda.h b/drivers/pci/contro= ller/plda/pcie-plda.h > index 727fc54312c9..363fcbbaf6ec 100644 > --- a/drivers/pci/controller/plda/pcie-plda.h > +++ b/drivers/pci/controller/plda/pcie-plda.h > @@ -6,6 +6,9 @@ > #ifndef _PCIE_PLDA_H > #define _PCIE_PLDA_H > =20 > +/* Number of MSI IRQs */ > +#define PLDA_MAX_NUM_MSI_IRQS 32 > + > /* PCIe Bridge Phy Regs */ > #define PCIE_PCI_IRQ_DW0 0xa8 > #define MSIX_CAP_MASK BIT(31) > @@ -99,4 +102,22 @@ > #define EVENT_PM_MSI_INT_SYS_ERR 12 > #define NUM_PLDA_EVENTS 13 > =20 > +struct plda_msi { > + struct mutex lock; /* Protect used bitmap */ > + struct irq_domain *msi_domain; > + struct irq_domain *dev_domain; > + u32 num_vectors; > + u64 vector_phy; > + DECLARE_BITMAP(used, PLDA_MAX_NUM_MSI_IRQS); > +}; > + > +struct plda_pcie_rp { > + struct device *dev; > + struct irq_domain *intx_domain; > + struct irq_domain *event_domain; > + raw_spinlock_t lock; > + struct plda_msi msi; > + void __iomem *bridge_addr; > +}; > + > #endif > --=20 > 2.17.1 >=20 --+ZHf5FLqtzeKhJjg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZS+2ZAAKCRB4tDGHoIJi 0g8wAQDLfI6cKlLrcjsYvlotPgj0HcXfUcSgUawM+JMX+fAPQwD+MmEJIKAlAn6Q BqFWTN4tAvjPd7jdT0K4YbncnvPBRw8= =M+Mv -----END PGP SIGNATURE----- --+ZHf5FLqtzeKhJjg--