From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBD106FA1 for ; Mon, 3 Apr 2023 14:32:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 235B9C433D2; Mon, 3 Apr 2023 14:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680532359; bh=d2kJloD1m/EvDPqToiYYJTD3x8xotyhjKibguqq2vME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iMEqcEAhtU8yIBfyDhyLelbzgErzRByEarGQXH5hCjeBiHePWn4trA7aT6xd7nAgV 1G+yb49y1/nbjsSdSRQrZow5d3NRTiN2TV3Hdtp/7bSrUFm09xIZ63k9AgPvRCo1xR U2yy4t6qYEkmGHwJ0a6TobS5DUNi8ObDnFngtL9A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Antti Laakso , Artem Bityutskiy , Len Brown , Sasha Levin Subject: [PATCH 5.15 22/99] tools/power turbostat: fix decoding of HWP_STATUS Date: Mon, 3 Apr 2023 16:08:45 +0200 Message-Id: <20230403140402.579048052@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403140356.079638751@linuxfoundation.org> References: <20230403140356.079638751@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Antti Laakso [ Upstream commit 92c25393586ac799b9b7d9e50434f3c44a7622c4 ] The "excursion to minimum" information is in bit2 in HWP_STATUS MSR. Fix the bitmask used for decoding the register. Signed-off-by: Antti Laakso Reviewed-by: Artem Bityutskiy Signed-off-by: Len Brown Signed-off-by: Sasha Levin --- tools/power/x86/turbostat/turbostat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 84b8a35c91972..a3197efe52c63 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4241,7 +4241,7 @@ int print_hwp(struct thread_data *t, struct core_data *c, struct pkg_data *p) fprintf(outf, "cpu%d: MSR_HWP_STATUS: 0x%08llx " "(%sGuaranteed_Perf_Change, %sExcursion_Min)\n", - cpu, msr, ((msr) & 0x1) ? "" : "No-", ((msr) & 0x2) ? "" : "No-"); + cpu, msr, ((msr) & 0x1) ? "" : "No-", ((msr) & 0x4) ? "" : "No-"); return 0; } -- 2.39.2