Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7530897rdb; Wed, 3 Jan 2024 21:56:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE84UHWdE3wzLcZUQCY5W7nGMo4P1WDuB+5tXXmDRixeL5+R/aFqRDXxFz89sDhG78zt9ee X-Received: by 2002:a05:6512:5c8:b0:50e:73a1:f519 with SMTP id o8-20020a05651205c800b0050e73a1f519mr38825lfo.80.1704347783638; Wed, 03 Jan 2024 21:56:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704347783; cv=none; d=google.com; s=arc-20160816; b=WzWAeuc1ZobbO9Pw3meLVn2kNaY0lEa5rXRbPFlaygrP2rG0cVN8aKINLpD8Lbj3i+ am2G3sHKJLupI16jRtw9LyjWbyJlA5esUtfsfnlFE+yPkFN5QLmFLpztGZwpfLpvhy7y r+5esYQTuHgfjpwKo4nXfbHFly4Ry2SQUl2Z3u1CXg5l5VTQVQAFgXV3R9wRfDu/fBp3 /t4vzs14ROK+SzfvVWKNjNbVdeZn7H7N5N6lamK2xyDUMq/Ok5+P8Oqjwf2/xEr52LZz AK+ZAFZ7gh7db7cDQAhr25fvtLYpwnTP7izdNKmt/wq5x2ExKB3YYcdhoSktsDchezwh rV1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Uf9xX6NGzjv1ISMlid2UcA3oN+qjOMTFEKHCEil84EA=; fh=tASXcw/Y9OHNSVQTBHnyvQaDa0Kqk30bVIjfyjLNGj4=; b=mzIwFStt9tpU/4VvgXtlG8fkAbl60Hqs7QwAy7jL32vnThP+KT/RNzN0YgytTUgrXe XrLJ68v4Sf85Qubq4X4UeanwFA7ZVjqVZj7tyC0TfQW5kp9IyyoWGQPQVT6WTWBKFWuf IthaG2MAOh3wikE2suRfbMAdaFhvkikjMWuDoaMRQ5A6S40aS63JbQV5JEuoGDmPdBR4 H60go7h7xg3EzVEjdBOHUDFMSE+T7HHLyjdTkSiRlXpfa4BGPcqUyXMdQRCbiNEqvZfU 5xtTYwf9JcZB5tcTGe8PjhYGWnXAMC8YW9Iw13mvYQsSk8VYbL6jx2HzbXweiQe1RZOC Iq8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XEAWvMiy; spf=pass (google.com: domain of linux-kernel+bounces-16268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id vp15-20020a17090712cf00b00a27d992a6d6si3506921ejb.610.2024.01.03.21.56.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 21:56:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XEAWvMiy; spf=pass (google.com: domain of linux-kernel+bounces-16268-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16268-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 13ADD1F26DAA for ; Thu, 4 Jan 2024 05:50:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE3C718EBD; Thu, 4 Jan 2024 05:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XEAWvMiy" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E9B21A710 for ; Thu, 4 Jan 2024 05:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6d9af1f52bcso72361b3a.3 for ; Wed, 03 Jan 2024 21:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704347436; x=1704952236; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Uf9xX6NGzjv1ISMlid2UcA3oN+qjOMTFEKHCEil84EA=; b=XEAWvMiyIvCSukO3FitDAFBdKhzLDI/tvLdqP20JJiSKYV0RUgF9RY4QOGwf2vcmOg B6xCMPebYroO3TAJOzXRNnMDXPiL1PncmhuM9r/a2+JcUgLIuOGoRsGMzzHCPKMCjOQ5 eWrPuDkibkQGauMZhr0/sL3E006QsJboJ7LmdULTglMX9Kon/k5xM011qjeO+k/hwQNh Gr5nTFlsuvhuZOEbFiIkoq6FTHzg2eGeBTDOoM3/c66AWC2HztFweJpA3mMop1VJaTlH +X163fQX7Bajk39NDTQ5Qiz6agrfGOINFR5bMmckHoyGto6UvTqCaWXoQuYNwATOOBqO zIRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704347436; x=1704952236; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Uf9xX6NGzjv1ISMlid2UcA3oN+qjOMTFEKHCEil84EA=; b=OnId4NijarHeRV4Y/9CCM7T0E9D68zOv9Qyi2o64Pw0CQ/gUPHP/zBoIuPmqphdLw3 tVVPe/teBRlJWdfYIlnpq47d6PXHCwBdqNlXU6sbq9xFTz773cxxxiGqAY4t+amhMWih Q7PNCwH3I/S1yB6v6idITGeb563DWYxvAU4A/Y63LNCvGZOSi2l5jPYcPMMZxHmWvAiX wzo5WaE6ew2zsbQ1rg/4i7DN71rSJiYunBzoANVeqNrc75iTu2xyscKIyD7n8iHmnelO kQ4L/b6Dx3IAiJMUy22ARJ043xVdJw0W1NCrRkfifGfW/u7pa5aj7oteLn0/4uNymyi+ DKhA== X-Gm-Message-State: AOJu0YyoWSwKtUvqKgFwCjlTWywIJevfsk6OSR3Ty7tFcC+8u8LWg3d4 HsGI4DPbisjncvikI7noJNHxZo0RY+Oz X-Received: by 2002:a05:6a00:2e81:b0:6d9:8d50:55d with SMTP id fd1-20020a056a002e8100b006d98d50055dmr157139pfb.47.1704347435731; Wed, 03 Jan 2024 21:50:35 -0800 (PST) Received: from thinkpad ([220.158.159.72]) by smtp.gmail.com with ESMTPSA id f22-20020aa78b16000000b006d0d90edd2csm23793210pfd.42.2024.01.03.21.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 21:50:35 -0800 (PST) Date: Thu, 4 Jan 2024 11:20:30 +0530 From: 'Manivannan Sadhasivam' To: Shradha Todi Cc: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, josh@joshtriplett.org, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, pankaj.dubey@samsung.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v2 0/3] Add support for RAS DES feature in PCIe DW controller Message-ID: <20240104055030.GA3031@thinkpad> References: <20231130115044.53512-1-shradha.t@samsung.com> <20231130165514.GW3043@thinkpad> <000601da3e07$c39e5e00$4adb1a00$@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <000601da3e07$c39e5e00$4adb1a00$@samsung.com> On Wed, Jan 03, 2024 at 11:13:20AM +0530, Shradha Todi wrote: > > > > -----Original Message----- > > From: Shradha Todi > > Sent: 04 December 2023 14:10 > > To: 'Manivannan Sadhasivam' > > Cc: 'lpieralisi@kernel.org' ; 'kw@linux.com' > > ; 'robh@kernel.org' ; > > 'bhelgaas@google.com' ; 'jingoohan1@gmail.com' > > ; 'gustavo.pimentel@synopsys.com' > > ; 'josh@joshtriplett.org' > > ; 'lukas.bulwahn@gmail.com' > > ; 'hongxing.zhu@nxp.com' > > ; 'pankaj.dubey@samsung.com' > > ; 'linux-kernel@vger.kernel.org' > kernel@vger.kernel.org>; 'linux-pci@vger.kernel.org' > pci@vger.kernel.org> > > Subject: RE: [PATCH v2 0/3] Add support for RAS DES feature in PCIe DW > > controller > > > > > > > > > -----Original Message----- > > > From: Manivannan Sadhasivam [mailto:manivannan.sadhasivam@linaro.org] > > > Sent: 30 November 2023 22:25 > > > To: Shradha Todi > > > Cc: lpieralisi@kernel.org; kw@linux.com; robh@kernel.org; > > > bhelgaas@google.com; jingoohan1@gmail.com; > > > gustavo.pimentel@synopsys.com; josh@joshtriplett.org; > > > lukas.bulwahn@gmail.com; hongxing.zhu@nxp.com; > > > pankaj.dubey@samsung.com; linux-kernel@vger.kernel.org; linux- > > > pci@vger.kernel.org > > > Subject: Re: [PATCH v2 0/3] Add support for RAS DES feature in PCIe DW > > > controller > > > > > > On Thu, Nov 30, 2023 at 05:20:41PM +0530, Shradha Todi wrote: > > > > DesignWare controller provides a vendor specific extended capability > > > > called RASDES as an IP feature. This extended capability provides > > > > hardware information like: > > > > - Debug registers to know the state of the link or controller. > > > > - Error injection mechanisms to inject various PCIe errors including > > > > sequence number, CRC > > > > - Statistical counters to know how many times a particular event > > > > occurred > > > > > > > > However, in Linux we do not have any generic or custom support to be > > > > able to use this feature in an efficient manner. This is the reason > > > > we are proposing this framework. Debug and bring up time of > > > > high-speed IPs are highly dependent on costlier hardware analyzers > > > > and this solution will in some ways help to reduce the HW analyzer usage. > > > > > > > > The debugfs entries can be used to get information about underlying > > > > hardware and can be shared with user space. Separate debugfs entries > > > > has been created to cater to all the DES hooks provided by the controller. > > > > The debugfs entries interacts with the RASDES registers in the > > > > required sequence and provides the meaningful data to the user. This > > > > eases the effort to understand and use the register information for > > > debugging. > > > > > > > > v1 version was posted long back and for some reasons I couldn't work > > > > on it. I apologize for the long break. I'm restarting this activity > > > > and have taken care of all previous review comments shared. > > > > v1: > > > > https://lore.kernel.org/all/20210518174618.42089-1-shradha.t@samsung > > > > .c > > > > om/T/ > > > > > > > > > > There is already a series floating to add similar functionality via > > > perf > > > subsystem: https://lore.kernel.org/linux-pci/20231121013400.18367-1- > > > xueshuai@linux.alibaba.com/ > > > > > > - Mani > > > > > > > Hi Mani, > > > > The series proposed in perf includes only time based-analysis and event counters > > which will monitor performance (Group 6 and 7). The patch or framework that we > > have proposed includes debug information, error injection facility and error > > counters (Group 0 - 5) which are not included as part of the functionality > > implemented via perf. In my opinion, these functionalities don't count as > > performance monitoring or counters but rather as debug counters. How about > > we take this up as a debugfs framework as proposed in my patch? > > Or if others feel it can be taken via perf driver then I am happy to extend the perf > > driver if authors do not have objection. Let me know what you think of this? > > Meanwhile I will review the perf patches and share my feedback. > > > > Hello Mani, > Any update on the above comment? IMO, even though the perf patches and this > patchset are both part of the DWC vendor specific capability - RASDES, they > cover different features. The perf file includes performance based parameters > like time-based analysis and event counters for count of packets whereas this > patchset includes debugging fields, error injection and event counters for count > of errors. I think having a separate debugfs file fits more but would you suggest > we extend the perf file itself? > For the error injection and counters, we already have the EDAC framework. So adding them in the DWC driver doesn't make sense to me. But first check with the perf driver author if they have any plans on adding the proposed functionality. If they do not have any plan or not working on it, then look into EDAC. - Mani > Shradha > > > > > Shradha Todi (3): > > > > PCI: dwc: Add support for vendor specific capability search > > > > PCI: debugfs: Add support for RASDES framework in DWC > > > > PCI: dwc: Create debugfs files in DWC driver > > > > > > > > drivers/pci/controller/dwc/Kconfig | 8 + > > > > drivers/pci/controller/dwc/Makefile | 1 + > > > > .../controller/dwc/pcie-designware-debugfs.c | 476 > > > ++++++++++++++++++ > > > > .../controller/dwc/pcie-designware-debugfs.h | 0 > > > > drivers/pci/controller/dwc/pcie-designware.c | 20 + > > > > drivers/pci/controller/dwc/pcie-designware.h | 18 + > > > > 6 files changed, 523 insertions(+) > > > > create mode 100644 > > > > drivers/pci/controller/dwc/pcie-designware-debugfs.c > > > > create mode 100644 > > > > drivers/pci/controller/dwc/pcie-designware-debugfs.h > > > > > > > > -- > > > > 2.17.1 > > > > > > > > > > -- > > > மணிவண்ணன் சதாசிவம் > > -- மணிவண்ணன் சதாசிவம்