Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp819454imm; Wed, 26 Sep 2018 07:17:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV62nYvA6l9RKfo6l5+UtWRoJDVCl2/SS4rV4NTmUVgEEMBkmCOR26WZwcs0SXbulftkfV66f X-Received: by 2002:a63:6a42:: with SMTP id f63-v6mr6146678pgc.48.1537971464615; Wed, 26 Sep 2018 07:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537971464; cv=none; d=google.com; s=arc-20160816; b=Y6gfnpT6moFR03UGptVxqpZkRwrB8KaTV/sVV/yRK/61F/B6iSmSYQsSygmtqAwitk liQXS9ewFhopMmPVhmlKlzJ51pILMEECXayOWmfuLRcCNc1b5GSkBXY2DJBzKcXzPS08 oP3niloqvExftP+N3+Pg4AcvQGRm1iJDsRO3BXNZmiAuONn2Aj/VC1lpDbH7l4KMLuC6 kXOg+Dl7N0yukoA3UKMVLsqk8XWfTeyImw+B6fvpLX5kajq9kgwhOa8psEKsufCdjUPS g9wA6003mF8g7Oc3caPe4s1LX4rjBm9YQQxQjQHU/OQ+irW/t/Cb6v6rHF38GSvlyaJ0 lmUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=zwXEHg611CtH5yBzxGQLuMtU6bQsz+rvFf8g/gUqlEM=; b=Pcr6vvLAmXM6nRhbE90LQGGsh/LAxMOHqZkXiD18ka91c1Xvif3Waf5iAJ4xCJ6mf1 BmMvWUcwJtQxfgSSst+wHV1qHpUdm3iuowOXevwiFg0ZcXa6knr8D1N3IceHWVwrLeXw MrDcbOw4UGCxE5NiszDDwIm+P/0PGb/cQ/DEoFmMYyqvYPTGutnJ7sAro8J87+43ba4X evERUX+z931Ju3e2MRwjsV4kd2r2UasQ221E8R8tdKB3T0qs3is0x3/lQ6Gh9ZYyKUDU P+b3oURghWQC+nbTkkgUIadr0dVqbrUDT+iuj6X/6oWjeHHYrENRYTKXVTbfbWasoNba DjkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23-v6si5249270pgi.409.2018.09.26.07.17.29; Wed, 26 Sep 2018 07:17:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbeIZU2o (ORCPT + 99 others); Wed, 26 Sep 2018 16:28:44 -0400 Received: from mga05.intel.com ([192.55.52.43]:4581 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726994AbeIZU2n (ORCPT ); Wed, 26 Sep 2018 16:28:43 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 07:15:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208";a="266868113" Received: from rbhardw1-mobl.gar.corp.intel.com (HELO [10.252.74.64]) ([10.252.74.64]) by fmsmga006.fm.intel.com with ESMTP; 26 Sep 2018 07:11:51 -0700 Subject: Re: [PATCH 1/4] platform/x86: intel_pmc_core: Show Latency Tolerance info To: Andy Shevchenko Cc: Platform Driver , Darren Hart , Andy Shevchenko , Linux Kernel Mailing List , Rajneesh Bhardwaj , Souvik Kumar Chakravarty References: <20180903180415.31575-1-rajneesh.bhardwaj@linux.intel.com> From: "Bhardwaj, Rajneesh" Message-ID: <04398317-a3b8-9387-e532-fcf26da9220e@linux.intel.com> Date: Wed, 26 Sep 2018 19:41:49 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26-Sep-18 7:18 PM, Andy Shevchenko wrote: > On Mon, Sep 3, 2018 at 9:06 PM Rajneesh Bhardwaj > wrote: >> This adds support to show the Latency Tolerance Reporting for the IPs on >> the PCH as reported by the PMC. The format shown here is raw LTR data >> payload that can further be decoded as per the PCI specification. >> >> This also fixes some minor alignment issues in the header file by >> removing spaces and converting to tabs at some places. > Thanks for the patch, my comments below. Hi Andy, Thanks for the review, my answers below. > >> +static const struct pmc_bit_map spt_ltr_show_map[] = { >> + {"IP 0 : LTR_SOUTHPORT_A", SPT_PMC_LTR_SPA}, >> + {"IP 1 : LTR_SOUTHPORT_B", SPT_PMC_LTR_SPB}, >> + {"IP 2 : LTR_SATA", SPT_PMC_LTR_SATA}, >> + {"IP 3 : LTR_GIGABIT_ETHERNET", SPT_PMC_LTR_GBE}, >> + {"IP 4 : LTR_XHCI", SPT_PMC_LTR_XHCI}, >> + /* IP 5 is reserved */ >> + {"IP 6 : LTR_ME", SPT_PMC_LTR_ME}, >> + /* EVA is Enterprise Value Add, doesn't really exist on PCH */ >> + {"IP 7 : LTR_EVA", SPT_PMC_LTR_EVA}, >> + {"IP 8 : LTR_SOUTHPORT_C", SPT_PMC_LTR_SPC}, >> + {"IP 9 : LTR_HD_AUDIO", SPT_PMC_LTR_AZ}, >> + /* IP 10 is reserved */ >> + {"IP 11 : LTR_LPSS", SPT_PMC_LTR_LPSS}, >> + {"IP 12 : LTR_SOUTHPORT_D", SPT_PMC_LTR_SPD}, >> + {"IP 13 : LTR_SOUTHPORT_E", SPT_PMC_LTR_SPE}, >> + {"IP 14 : LTR_CAMERA", SPT_PMC_LTR_CAM}, >> + {"IP 15 : LTR_ESPI", SPT_PMC_LTR_ESPI}, >> + {"IP 16 : LTR_SCC", SPT_PMC_LTR_SCC}, >> + {"IP 17 : LTR_ISH", SPT_PMC_LTR_ISH}, >> + /* Below two cannot be for LTR_IGNORE */ >> + {"LTR_CURRENT_PLATFORM", SPT_PMC_LTR_CUR_PLT}, >> + {"LTR_AGGREGATED_SYSTEM", SPT_PMC_LTR_CUR_ASLT}, > Before no map has this fancy "IP xx :" prefixes. Please, remove.  The users of the driver often ask for IP Numbers while performing LTR_IGNORE operation so this is deliberately added. Please consider it. > >> + {}, > No need for comma Ok. >> + > Redundant. OK > >> +}; >> +static const struct pmc_bit_map cnp_ltr_show_map[] = { > Same comments as above. > >> +}; >> + debugfs_create_file("ltr_show", 0644, dir, pmcdev, >> + &pmc_core_ltr_fops); > One line? IIRC, it was crossing the limit. I will check again and if possible would change it. > >> #define NUM_RETRIES 100 >> #define NUM_IP_IGN_ALLOWED 17 > + blank line here. Sure. > >> +#define SPT_PMC_LTR_CUR_PLT 0x350