Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1868231pxb; Mon, 8 Mar 2021 08:15:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJze+Q08MCO2fvUCK+QRyN/ud39eTwIdfvUsfZEw6cFIxPjYmojc4lzhW/BExZN+mFLEnOFf X-Received: by 2002:a05:6402:30a5:: with SMTP id df5mr23383282edb.24.1615220106545; Mon, 08 Mar 2021 08:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615220106; cv=none; d=google.com; s=arc-20160816; b=x1ao5cVwA1J1OXKxJLVx1BNCEyLRETxDBh7W7KBtCforclcG3M97ecY5QYAUApaBZp 4SoIW9J/8Biii7XT/lEwCfm54GWl1Hbl20/f5eaRhBQGGRmF+Oiz3OXwBAo9LkCKOrC6 NsYDzfsaFCDUNAYX8QskAR7Yl9/BaGQHOSREnuFZ4yG42iCoMw0YmkotgPm/l+3C125B rq0osWcOSrbUUsn3Q9zxZHcap7hQYZK1q3FpuXjYtlTGkeN9eEwJho4ypVBzx1wGTTkF 5suBZv0RhQKRx4zwfEaGCqvMYEX/azrPQM63e8284llpuyyooMIjdHcnC/wpAp/bkRCB iXxQ== 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:ironport-sdr :ironport-sdr; bh=FHeO5ki0ZvPoVnmGi4W8sUxULA1vw4Mpb1AaMBEf1t4=; b=jQmVL9RU0iLCOwhBY8xAlhiW8V2OxWv/mZK08TgVE4L+bu56ZsyATvRfbgNiyk/qJM VvG8qATIxkkNZEKkXXcptne0MB9En7RDZZpus0gM4b8+AwurlzaiSL/STtMsYTGg2W7d cbx2L7mogC45D07OG1Br8IGy2AwcpW/GhV/MTvOHKtHEPPfG93+BfxUq0oX5rp8COcAp Qo3lI+fuOcubm4IEMdk+wtcn8uAh7Dipi3DvBrYFVmPku65FOVpTDCjtJ1ZYNwNLC1ew VW+KUbWQBc7aP97SFoD24GJBQkvNDpF/ZxoYLzRacwfu0eq2+yCGh/Ain9mUkQIjglIu tP0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id z2si7161168ejn.577.2021.03.08.08.14.43; Mon, 08 Mar 2021 08:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229928AbhCHQMS (ORCPT + 99 others); Mon, 8 Mar 2021 11:12:18 -0500 Received: from mga11.intel.com ([192.55.52.93]:49959 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbhCHQML (ORCPT ); Mon, 8 Mar 2021 11:12:11 -0500 IronPort-SDR: spigiwSSOnak251+RgI1AC3vegnV1fDSh+j/VHWcrCgIRn8+gJfX+ufHWGYVzLvSiJsJECXis3 dah4wzs7iX7A== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="184694040" X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="184694040" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 08:11:46 -0800 IronPort-SDR: dBobVGOy4zQldOCGM+K1gTE9D4K5BZ7gDOmu8jL0SZY+SaeN0KHAuTU8p+ZNkEqSeV0CKiLPM6 88zP1K3w7Kgg== X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="447180097" Received: from chenyu-desktop.sh.intel.com (HELO chenyu-desktop) ([10.239.158.173]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 08:11:43 -0800 Date: Tue, 9 Mar 2021 00:15:48 +0800 From: Chen Yu To: Doug Smythies , youling257 Cc: youling257 , lenb@kernel.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, Len Brown , Chen Yu Subject: Re: [3/3,v3] tools/power turbostat: Enable accumulate RAPL display Message-ID: <20210308161548.GA37664@chenyu-desktop> References: <1f6d32e14f121a8ccf8807b8343597c3ae88c7d2.1587196252.git.yu.c.chen@intel.com> <20210308134957.23852-1-youling257@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Mar 08, 2021 at 07:37:07AM -0800, Doug Smythies wrote: > On Mon, Mar 8, 2021 at 5:50 AM youling257 wrote: > > > > this cause turbostat not work on amd cpu. > > > > root@localhost:~# /turbostat > > turbostat version 20.09.30 - Len Brown > > CPUID(0): AuthenticAMD 0xd CPUID levels; 0x8000001f xlevels; family:model:stepping 0x17:18:1 (23:24:1) > > There are already two fixes for this in the queue. > https://marc.info/?l=linux-pm&m=161382097503925&w=2 > https://marc.info/?l=linux-pm&m=161141701219263&w=2 Thanks for reporting and pointing this out. I assume these two patches are both fixing the same issue? It looks like these two patches should be merged into one: 1. Bingsong's patch access MSR_PKG_ENERGY_STAT only when RAPL_AMD_F17H is set, which is consistent with the original context. 2. Bas Nieuwenhuizen's patch also fixes the issue in idx_valid() in case RAPL_PKG was not set but with RAPL_AMD_F17H set. thanks, Chenyu