Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1019997ybe; Wed, 4 Sep 2019 11:14:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv3nhZzco9/Hu6mOci5g8Nyc/C5FSvZJdBQAMYVYQP+t9qy+X6bLSlXqclmLAG1l6gBxsx X-Received: by 2002:a17:90a:c386:: with SMTP id h6mr6295579pjt.122.1567620874944; Wed, 04 Sep 2019 11:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620874; cv=none; d=google.com; s=arc-20160816; b=AOt10gOhP0muqIeuxj4igv1bjVbg8RH9RFAbY8OkebOiWk/3WaPTh8L/YJs37c4VxY h+OAY04t+UwyMVxLF8x1zbDIxKU9HUaBF+ZN7jtMQft25V8LrHgYaya076R3X1/gYJeB qxPzboO0yXGuCyMbiV5gX7ZJ3XWZt6XzMKC4cNqGaTZ/mlo6/lZEM6mTws12uEUfcPNV 8qUFGdAyHZZtWjr/WiNtNRGBgWEUawIQg3s1069TFhFE3gR8UEt/ZaSP//+cWZgqr++i PMp50ggYanETZObTv2aHW61RSVDG2yXswgdCa7kVc/mgZeD/G36LZ0RQgwzLxLC7n1Qa RTnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aiDVD49hEN7ayLVxv+EchxCgky6qqL0mxSNx3myGahE=; b=SwuLELZeD2jtCFEkEI6mC3WQdZMBQU4Xf2q4VD7ezb+jy1KzajxE/32ixk+Cjwwu79 gpnWdYXK+inPFu7gO/RbTQ5USVRO+youC4AR0flr2p43ImBt6rNgcIgDCh+vPTKx9WuP Wx2vRGDSnRhf+G+r1jBs3vORLOTRHzOoVKBN3QUFJFo4rvzWH2SUc7zAWL6GmPHCfN8A KiFYYAtKW+mXDhhdIi/fsnY8h5N4dRCmH1jJuaLjKbEwhnOrrOGgKv/TNGDO42REdNHH VTcekV2q2VHZimHnu5sHVBiiY2zSVzsvMQ3wj1eDCr5mDggzHfKkwmEc2TnPLsBafaRD zhdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vPAI8I20; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si17515790pgi.121.2019.09.04.11.14.19; Wed, 04 Sep 2019 11:14:34 -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; dkim=pass header.i=@kernel.org header.s=default header.b=vPAI8I20; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390566AbfIDSMw (ORCPT + 99 others); Wed, 4 Sep 2019 14:12:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:57370 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389947AbfIDSMt (ORCPT ); Wed, 4 Sep 2019 14:12:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B86E206BA; Wed, 4 Sep 2019 18:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620768; bh=Qt0pZTBm2HLd9hNL3X5vWaW/wEcU1poUIWeHPEe82YQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vPAI8I20L/jdgUsmpZs/GJyw2fbgqYzFFrR52ougpGbGD/JudUxIKsE2XZQ0y6rjs Y6+tplZ3r/DHxSLEwla5cvsTH50abk8UaAVxCJDqRRWmgVhCIKel0eeH8GRhLZwZuX UykpswWRcasGp0WFiEwK+aNO1FT/HGGpiKonlU5U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pu Wen , Calvin Walton , Len Brown Subject: [PATCH 5.2 087/143] tools/power turbostat: Fix caller parameter of get_tdp_amd() Date: Wed, 4 Sep 2019 19:53:50 +0200 Message-Id: <20190904175317.487175133@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pu Wen commit 9cfa8e042f7cbb1994cc5923e46c78b36f6054f4 upstream. Commit 9392bd98bba760be96ee ("tools/power turbostat: Add support for AMD Fam 17h (Zen) RAPL") add a function get_tdp_amd(), the parameter is CPU family. But the rapl_probe_amd() function use wrong model parameter. Fix the wrong caller parameter of get_tdp_amd() to use family. Cc: # v5.1+ Signed-off-by: Pu Wen Reviewed-by: Calvin Walton Signed-off-by: Len Brown Signed-off-by: Greg Kroah-Hartman --- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4002,7 +4002,7 @@ void rapl_probe_amd(unsigned int family, rapl_energy_units = ldexp(1.0, -(msr >> 8 & 0x1f)); rapl_power_units = ldexp(1.0, -(msr & 0xf)); - tdp = get_tdp_amd(model); + tdp = get_tdp_amd(family); rapl_joule_counter_range = 0xFFFFFFFF * rapl_energy_units / tdp; if (!quiet)