From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7380C433DB for ; Mon, 8 Mar 2021 16:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 949686522E for ; Mon, 8 Mar 2021 16:12:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230125AbhCHQMT (ORCPT ); Mon, 8 Mar 2021 11:12:19 -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