Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1809044iog; Thu, 16 Jun 2022 14:28:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFG/lPt9NVQFEZVr3gsT16zWstNfaFzpuZ6TdeQc/NOaw4R9ucDIdO7nvg4assZKkTGXE3 X-Received: by 2002:a17:90a:eb11:b0:1e6:7865:4ecb with SMTP id j17-20020a17090aeb1100b001e678654ecbmr17871067pjz.172.1655414890046; Thu, 16 Jun 2022 14:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655414890; cv=none; d=google.com; s=arc-20160816; b=NDsvmsJzkWERpJSMECPuLNeVlUkN0RsPnQpZT+IiDpFI7c7CnUeGkaJG9RpMjdDo8a 810W779aDU7gwc9we2CwKRJlk3/5mkcxDF8W+Ovbto1oALl5ouNKGHmRN9J74DVkG/Kc NwRtx7dCO95l9nwI2gLzg/WDahYFiWv2qu0EWNFQyBRu6E2TSEcy1j4pDyCP29n3TMfY yVEnnxombEBV3Gd/GEUZZzfzJfrl0B8vmMuLNmt7HBGLUYZpf/TUmv35cmbpHbibbmRp yxdvMP49ZLYHFmG60j8jS2uwCBwGHhNfwUBvvGUWu1mieODImAmKVYwp4dehngU3DjVy 2V1w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2r8CtVI1tPNHi16JfLtZURG5y2oQUhHCkL352qctEB4=; b=cPOcm2Kwpvz/Eno7mKz1HcSvjdiZQlGVwbrCPtcs1SSE4nv63x2V4ZBxR5ibzbNn03 s68MbYg0gu1DTYe5opyhwCdUJKsZRzLDaxcHKRF7YEBGHwFCeLPzXYPq+50cg7NmWJed 2DmG96bZz25usyT6u1GaBTxHvRhfCAj0UdxCx0Hs+vve6n1qrXRUTmsdgZSOgkM704YN BXm35KQV8Uts4ogAN+IvhbZL4+hkFW5tuKHJ9Ayu5y6JzSzbWhX5yej+RhGYqXb/VzCp JfxiLsQesqh9l2DE56hfLWkuR2nqeaPyl0c5HRGpkhcEmi6muV3uQpuNW5M36UPHN8cn 8hOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZFKQQZDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a170902904300b0015cfa9a0a25si3209794plz.361.2022.06.16.14.27.56; Thu, 16 Jun 2022 14:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZFKQQZDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1378907AbiFPVFD (ORCPT + 99 others); Thu, 16 Jun 2022 17:05:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378761AbiFPVFC (ORCPT ); Thu, 16 Jun 2022 17:05:02 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E001A606CF for ; Thu, 16 Jun 2022 14:04:59 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id k7so2223096plg.7 for ; Thu, 16 Jun 2022 14:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=2r8CtVI1tPNHi16JfLtZURG5y2oQUhHCkL352qctEB4=; b=ZFKQQZDng7Udj+pP4+RgtZnW1aSKCMk7IL9cjW+d5bxsPVxEaELqcuxnw3P7JeVFKS 1fXiCRT5Q1vr004plkuABaw9LXvOqnJiBiZmFqKNzJYWb3rhtRCveZSG2cmOwcw2Wazl z99IQOgdWuudInHw5HuTXVn25rLkWfTJSWCX+3e+ZeJLBgqDRmDCFnMHd8Q9b4Ixot9q yH7J1yGkvuJ4NPEdXxIlhvGUrWmpwHCYjHtkEX/0P7rMNfp81kupvOKg1geFVAc+NncQ /mCx9UcVLtH4Z9vUGeOybVyloIJPvG8U91NIWnQiex/Bc2hBC89BnOubOYLd2JL4w47L 7ZFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2r8CtVI1tPNHi16JfLtZURG5y2oQUhHCkL352qctEB4=; b=HC/ive89iFQ8JBwIUMTLV5VjbpSbUIOKwCTcRDWDeKEN5VPtocVC6ACw7kQC3tdG8p u8lhZwWQwz0BGqBWwJEANLuLCAJzN7ldn37Mrt+p01cyGlSquLdbPizYpzPQc4hlDnjg hMPdjWqSJAhObfT00mjZnjs6W7/P1K6j0O3h/IgTEMWRnCZeIC7OF/jxYVc+Y8u/ibaW iakRiEnVqJ51YIZ6qDxlEM4RlY/YbJWtNxZZwNzzgeeDtB+CUPxRH7kqsiNSI5loWRwj +UljxbZEfqLW6CVdXVwqB/iSPLeLZ0vOCilkh/n3deYgcyb+2Jn6EyQxXnC1kNS0iHnd hQrw== X-Gm-Message-State: AJIora9QjTGhG9HWPRzYrqIDGlDeK+4SyrxGDVWA0aJrPpw125E5NZWq rVi4/Jkf6w24ypqUaP3JFJBN X-Received: by 2002:a17:903:120c:b0:167:8847:21f2 with SMTP id l12-20020a170903120c00b00167884721f2mr6648461plh.11.1655413499281; Thu, 16 Jun 2022 14:04:59 -0700 (PDT) Received: from thinkpad ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id b21-20020a170902d89500b0015e8d4eb2cdsm2041555plz.279.2022.06.16.14.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 14:04:58 -0700 (PDT) Date: Fri, 17 Jun 2022 02:34:56 +0530 From: Manivannan Sadhasivam To: Serge Semin Cc: Serge Semin , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Alexey Malahov , Pavel Parkhomenko , Jingoo Han , Gustavo Pimentel , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Frank Li , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 00/18] PCI: dwc: Various fixes and cleanups Message-ID: <20220616210456.GH2889@thinkpad> References: <20220610082535.12802-1-Sergey.Semin@baikalelectronics.ru> <20220610082919.4wetzo7wj4bnjp45@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220610082919.4wetzo7wj4bnjp45@mobilestation> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Fri, Jun 10, 2022 at 11:29:19AM +0300, Serge Semin wrote: > On Fri, Jun 10, 2022 at 11:25:16AM +0300, Serge Semin wrote: > > This patchset is a first one in the series created in the framework of > > my Baikal-T1 PCIe/eDMA-related work: > > > > [1: In-progress v4] PCI: dwc: Various fixes and cleanups > > Link: ---you are looking at it--- > > [2: In-progress v2] PCI: dwc: Add hw version and dma-ranges support > > Link: https://lore.kernel.org/linux-pci/20220503214638.1895-1-Sergey.Semin@baikalelectronics.ru/ > > [3: In-progress v2] PCI: dwc: Add extended YAML-schema and Baikal-T1 support > > Link: https://lore.kernel.org/linux-pci/20220503214638.1895-1-Sergey.Semin@baikalelectronics.ru/ > > [4: In-progress v2] dmaengine: dw-edma: Add RP/EP local DMA support > > Link: https://lore.kernel.org/linux-pci/20220503225104.12108-1-Sergey.Semin@baikalelectronics.ru/ > > > > Note it is very recommended to merge the patchsets in the same order as > > they are placed in the list above in order to prevent possible merge > > conflicts. Nothing prevents them from being reviewed synchronously though. > > Any tests are very welcome! > > > > As it can be easily inferred from the patchset title, this series is about > > the DW PCIe Root Port/Endpoint driver fixes and the code cleanups, where > > fixes come before the cleanup patches. The patchset starts with adding the > > stop_link() platform-specific method invocation in case of the PCIe host > > probe procedure errors. It has been missing in the cleanup-on-error path > > of the DW PCIe Host initialization method. After that the unrolled CSRs > > layout is added to the iATU disable procedure. In third the disable iATU > > procedure is fixed to be called only for the internal ATU as being > > specific for the internal ATU implementation. Then the outbound iATU > > extended region setup procedure is fixed to have the INCREASE_REGION_SIZE > > flag set based on the limit-address - not the region size one. The last > > but not least the CDM-check enabling procedure is fixed to be independent > > from the non-related num_lanes field state. > > > > Afterwards there is a series of cleanups. It concerns the changes like > > adding braces to the multi-line if-else constructions, trailing new-lines > > to the print format-string, dropping unnecessary version checking, and > > various code simplifications and optimizations. > > > > New features like adding two-level DT bindings abstraction, adding better > > structured IP-core version interface, adding iATU regions size detection > > and the PCIe regions verification procedure, adding dma-ranges support, > > introducing a set of generic platform clocks and resets and finally adding > > Baikal-T1 PCIe interface support will be submitted in the next part of the > > series. > > > > Link: https://lore.kernel.org/linux-pci/20220324012524.16784-1-Sergey.Semin@baikalelectronics.ru/ > > Changelog v2: > > - Fix the end address of the example in the patch log with > > the INCREASE_REGION_SIZE flag usage fixup. It should be > > 0x1000FFFF and not 0x0000FFFF (@Manivannan). > > - Add the cleanup-on-error path to the dw_pcie_ep_init() function. > > (@Manivannan) > > > > Link: https://lore.kernel.org/linux-pci/20220503212300.30105-1-Sergey.Semin@baikalelectronics.ru/ > > Changelog v3: > > - Convert region variable type to u32 in order to fix the implicit type > > conversion peculiarity. (@kbot) > > - Rebase onto v5.18-rc6. > > > > Link: https://lore.kernel.org/linux-pci/20220517125058.18488-1-Sergey.Semin@baikalelectronics.ru/ > > Changelog v4: > > - Move the patch "PCI: dwc: Deallocate EPC memory on EP init error" to > > being applied before the cleanup patches. > > > - Add a new fixes patch: "PCI: dwc: Enable CDM-check independently from > > the num_lanes value". > > - Add a new cleanup patch: "PCI: dwc: Organize local variables usage". > > - Add a new cleanup patch: "PCI: dwc: Re-use local pointer to the > > resource data". > > - Add a new cleanup patch: "PCI: dwc: Add start_link/stop_link inliners". > > - Add a new cleanup patch: "PCI: dwc: Move io_cfg_atu_shared to the Root > > Port descriptor". > > - Add a new cleanup patch: "PCI: dwc: Add dw_ prefix to the pcie_port > > structure name". > > - Drop the patch "PCI: dwc: Don't use generic IO-ops for DBI-space > > access". (@Rob) > > - Drop Manivannan tested tag from the changed patches. > > @Mani, there are several brand new patches in this series and a few > ones updated (@Rob requests). Could you please have a look at the > patchset one more time? > Yep, this is on my todo list. But I'm in a company wide meetup currently. Will take a look once I'm back this weekend. I'll also give this series (and other ones) a go on my hardware. Thanks, Mani > -Sergey > > > - Rebase onto v5.18. > > > > Signed-off-by: Serge Semin > > Cc: Alexey Malahov > > Cc: Pavel Parkhomenko > > Cc: Jingoo Han > > Cc: Gustavo Pimentel > > Cc: "Krzysztof Wilczyński" > > Cc: Frank Li > > Cc: Manivannan Sadhasivam > > Cc: linux-pci@vger.kernel.org > > Cc: linux-kernel@vger.kernel.org > > > > Serge Semin (18): > > PCI: dwc: Stop link in the host init error and de-initialization > > PCI: dwc: Add unroll iATU space support to the regions disable method > > PCI: dwc: Disable outbound windows for controllers with iATU > > PCI: dwc: Set INCREASE_REGION_SIZE flag based on limit address > > PCI: dwc: Deallocate EPC memory on EP init error > > PCI: dwc: Enable CDM-check independently from the num_lanes value > > PCI: dwc: Add braces to the multi-line if-else statements > > PCI: dwc: Add trailing new-line literals to the log messages > > PCI: dwc: Discard IP-core version checking on unrolled iATU detection > > PCI: dwc: Convert Link-up status method to using dw_pcie_readl_dbi() > > PCI: dwc: Organize local variables usage > > PCI: dwc: Re-use local pointer to the resource data > > PCI: dwc: Add start_link/stop_link inliners > > PCI: dwc: Move io_cfg_atu_shared to the Root Port descriptor > > PCI: dwc: Add dw_ prefix to the pcie_port structure name > > PCI: dwc-plat: Simplify the probe method return value handling > > PCI: dwc-plat: Discard unused regmap pointer > > PCI: dwc-plat: Drop dw_plat_pcie_of_match forward declaration > > > > drivers/pci/controller/dwc/pci-dra7xx.c | 12 +- > > drivers/pci/controller/dwc/pci-exynos.c | 6 +- > > drivers/pci/controller/dwc/pci-imx6.c | 6 +- > > drivers/pci/controller/dwc/pci-keystone.c | 20 ++-- > > .../pci/controller/dwc/pci-layerscape-ep.c | 12 -- > > drivers/pci/controller/dwc/pci-layerscape.c | 2 +- > > drivers/pci/controller/dwc/pci-meson.c | 2 +- > > drivers/pci/controller/dwc/pcie-al.c | 6 +- > > drivers/pci/controller/dwc/pcie-armada8k.c | 4 +- > > drivers/pci/controller/dwc/pcie-artpec6.c | 4 +- > > .../pci/controller/dwc/pcie-designware-ep.c | 30 +++-- > > .../pci/controller/dwc/pcie-designware-host.c | 104 ++++++++++-------- > > .../pci/controller/dwc/pcie-designware-plat.c | 25 +---- > > drivers/pci/controller/dwc/pcie-designware.c | 72 +++++++----- > > drivers/pci/controller/dwc/pcie-designware.h | 46 +++++--- > > drivers/pci/controller/dwc/pcie-dw-rockchip.c | 4 +- > > drivers/pci/controller/dwc/pcie-fu740.c | 2 +- > > drivers/pci/controller/dwc/pcie-histb.c | 10 +- > > drivers/pci/controller/dwc/pcie-intel-gw.c | 6 +- > > drivers/pci/controller/dwc/pcie-keembay.c | 4 +- > > drivers/pci/controller/dwc/pcie-kirin.c | 2 +- > > drivers/pci/controller/dwc/pcie-qcom.c | 4 +- > > drivers/pci/controller/dwc/pcie-spear13xx.c | 6 +- > > drivers/pci/controller/dwc/pcie-tegra194.c | 22 ++-- > > drivers/pci/controller/dwc/pcie-uniphier.c | 10 +- > > drivers/pci/controller/dwc/pcie-visconti.c | 6 +- > > 26 files changed, 225 insertions(+), 202 deletions(-) > > > > -- > > 2.35.1 > > -- மணிவண்ணன் சதாசிவம்