From patchwork Fri Mar 20 05:22:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448415 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02F9D139A for ; Fri, 20 Mar 2020 05:23:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D530620722 for ; Fri, 20 Mar 2020 05:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681782; bh=6OhjbGaf8LjZTmnikiExjWjqLdqRgW3w5FuJGJijUuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=RU2gn0WQohUYpfv+92mb7oFR6GX1ICb+UzAPHXlbebQ8Zb9JeIAldRWdbSSjztbrv KBdQ2fGw1jPjgnRqF3+AXntnichc/vSwFY8cFfk77ONPSBX++ahP1qNKBbl5gITlWj PcW8CSHHMLziz0n3egWQYmeesQ7dLXN7dNfxccTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726851AbgCTFXC (ORCPT ); Fri, 20 Mar 2020 01:23:02 -0400 Received: from mail-qv1-f67.google.com ([209.85.219.67]:34896 "EHLO mail-qv1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgCTFXC (ORCPT ); Fri, 20 Mar 2020 01:23:02 -0400 Received: by mail-qv1-f67.google.com with SMTP id q73so2373328qvq.2 for ; Thu, 19 Mar 2020 22:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=mfq+jbDtLvNFwCkgXQFFx1U0KzFwGmwWgMQRhdX+ggg=; b=SiaamRppyc1pLmbvwUZdKMI9A+G+P0pUeZNdCNotkhO9Ph+cxbI/2RIqzeYJQiHMaC Ak1/14+8II800sgaDW8dJqJV1WE7m47icjWzBG0OunkehJPkOGYUswnL+0UI03r9XzJH 84uXz0SgxNxrNs98o0dpNrKkE3NSmSsUTTPHiruO0ham/BENaLX+thR75Vbx1uPZdSy1 rIiP2Q5OTfmK5K3g06rwu9wAzLZJGVwpMu/n+/8e9GnR+0RAyiLdsnLp6IkSOXyrDrxG LyQsMq5jwpBZ6/YXE/iJqu0d51a+xmhNakc2Ld5Jz9BqJHkIZVPakN+6h/vBHXPJfsBj ZCaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=mfq+jbDtLvNFwCkgXQFFx1U0KzFwGmwWgMQRhdX+ggg=; b=O1sPN7D4QNibQwAgXSwR6qBfofzdLhoIby4tFJKGjVpawILjZFhzfY8AkROkX2ZF1B BYyKoayN4iVM4KzfbIVrniGXkiXMGVWSS0lFzX+i0Qc9MSBpls5RKlNNKuo5kjqwbqGg CXxi5kq7ni2ku5s43b9Ql8y05sCEYMss3p325xfJq66zq5WfEqj2sSeTXuD94oOMCALF Q+PaA+c9SquSL99fiXXEZGEKb53nUi9D0V5lpwj/cZpNDssTAfscdBDT+g3o+aRIedI9 ykAzwlXGfYJX1L0Hf6kizAkIkFenzTM8GAQOn1yDra5pSMGxvOF+H87IG1nt0GlgiqGW faXw== X-Gm-Message-State: ANhLgQ0GXGb1k5lgreQ/fDrvTCzEoi0ITagykskS8B6pC+50SDelJMxe EZF5uVvN/EPKWv4CDD6It7YiB8Li X-Google-Smtp-Source: ADFU+vtg2u8l3emT7GpQ2m/BkbMMXLs9pVFHi7/EGAP3N6di6XnZaw7fB7mHVm2G0jJyj7aiGQMnhQ== X-Received: by 2002:a0c:9b95:: with SMTP id o21mr6571501qve.175.1584681780729; Thu, 19 Mar 2020 22:23:00 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.22.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:00 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Chen Yu , Rui Zhang , Len Brown Subject: [PATCH 01/10] tools/power turbostat: Support Cometlake Date: Fri, 20 Mar 2020 01:22:39 -0400 Message-Id: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200320052248.13037-1-lenb@kernel.org> References: <20200320052248.13037-1-lenb@kernel.org> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Chen Yu From a turbostat point of view, Cometlake is like Kabylake. Suggested-by: Rui Zhang Signed-off-by: Chen Yu Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 31c1ca0bb3ee..dd5ac9f52ac5 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4610,6 +4610,8 @@ unsigned int intel_model_duplicates(unsigned int model) case INTEL_FAM6_SKYLAKE: case INTEL_FAM6_KABYLAKE_L: case INTEL_FAM6_KABYLAKE: + case INTEL_FAM6_COMETLAKE_L: + case INTEL_FAM6_COMETLAKE: return INTEL_FAM6_SKYLAKE_L; case INTEL_FAM6_ICELAKE_L: From patchwork Fri Mar 20 05:22:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448417 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 69F45139A for ; Fri, 20 Mar 2020 05:23:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 493FB20739 for ; Fri, 20 Mar 2020 05:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681785; bh=LcRAqCzjXQWT2H/rYPS6BrRW7toEquDpW8Avwi0EzZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=hAMaV6UAVfwkOCGoGNNjfSZ/ypfGL6zg/E6Qee5VeoeqoUPKkJhsLKE7t3gOD6YAD Oenc/dppRCWQvo4bco25d80CrbBfOfnZ38+mB/qBpnJrcutCbmtz/4nnQbaoH5KUhp VeS+Wcv0P+DH+ORY64cJzQzBknc3C1argxOAvODY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbgCTFXE (ORCPT ); Fri, 20 Mar 2020 01:23:04 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:46861 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTFXE (ORCPT ); Fri, 20 Mar 2020 01:23:04 -0400 Received: by mail-qk1-f196.google.com with SMTP id f28so5661294qkk.13 for ; Thu, 19 Mar 2020 22:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=vCUT5im7xTqActkIFgeHwLZTn4xMUQygaqCeyzYMBSA=; b=u1cFAocf7Txeo5HIC/0UJtMiqn3LSQaTRez8P1syZI9Vwnei2CJ42e91FXG017LELF HV8Pzn0jxm19eNZVQAaBop5xJxEMbmvLJXofT3Erd5Th/5dXrTqfvitaYuHmdJH58s87 IYV5sos7uPx8Js2FP8kPp41i0esLfHddLtumgPtcvOEUsZrCh186omNyuKvrvbJN05hB jv92b8O2OdSsDWPWbUVSlLfN4BNB0lSii0sTGZCLPZqo8IZ+Qcv1czvfQWWvGL/WPwj9 V6VtOe4Jvc1ivh45WrGf/o20wqD6FgWBN3Fng/oJK99mAOjCNgjnZ770l8uP8yON/uzB Pxgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=vCUT5im7xTqActkIFgeHwLZTn4xMUQygaqCeyzYMBSA=; b=UUCFiJJ3MNH8IQDhjNTcaZhdESX6O30vh1jFnsOIF1EA7UD5Zlr2k/f8AVag6nNRDi TZ897R0/gaUlpgbETyx8xDtmJ4VmeztqVWDQdI2Mkly/IA/UNKJa7FIu28dBPSTcTfy/ TBcC1XaXAH5ue/DKpGezXZ0OMUYIbCe/pLsAKdhVVluo1tpBUwieZJkFyCJn5SeooVDc y9Ig4Qotg6gc9QnKaHU4vKqE9r46w4kWWDXKyNzVVH0hefAoAoCA7Dz7a0OQIeepH2lp puuVAnWeq5cZZPix8H3MgyhhXdqQG/Geyy9voazx00IsyJVu/WcRWWJs01HC2y5KIFg5 LmzA== X-Gm-Message-State: ANhLgQ1cmRA1TohJ3TbReEIF8llvb17jphyeSCFQq/JXqD7Dlx6Lp/7r qUkuzdvwGmUkyYRADo05YEOIOB6N X-Google-Smtp-Source: ADFU+vuyin1z80RAd0gXCntOC/1uwCzHauJKRu0c3/skEwVOFF/L8S+RxfVugIkJb3qohQDu+bhMRw== X-Received: by 2002:ae9:c312:: with SMTP id n18mr2448354qkg.472.1584681781915; Thu, 19 Mar 2020 22:23:01 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:01 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Len Brown Subject: [PATCH 02/10] tools/power turbostat: Fix gcc build warnings Date: Fri, 20 Mar 2020 01:22:40 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size [-Wstringop-truncation] reduce param to strncpy, to guarantee that a null byte is always copied into destination buffer. Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index dd5ac9f52ac5..fa95a8ca5565 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -5325,9 +5325,9 @@ int add_counter(unsigned int msr_num, char *path, char *name, } msrp->msr_num = msr_num; - strncpy(msrp->name, name, NAME_BYTES); + strncpy(msrp->name, name, NAME_BYTES - 1); if (path) - strncpy(msrp->path, path, PATH_BYTES); + strncpy(msrp->path, path, PATH_BYTES - 1); msrp->width = width; msrp->type = type; msrp->format = format; From patchwork Fri Mar 20 05:22:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448419 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A95F21668 for ; Fri, 20 Mar 2020 05:23:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8804020722 for ; Fri, 20 Mar 2020 05:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681785; bh=0WsB+r8nocA2ngJTa8aK7VBiwiBPRA2RzctIR3eyoks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=TfPHMdzFyPlLXArKFNuXeCGxtwy+qNaHKY+IGNTKyalUlVNcO/2TxIBe/hvEa0uk2 3NxAkSDahWdFRibEcPB1Dg8lVcif4n1KQ+r5QPj7B3saujujJoFZDJuEu0MdzReaMl BWpyOA/7pRNlpdIkeJ1k3IMoJFYNRjB3mAHVxt54= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726878AbgCTFXF (ORCPT ); Fri, 20 Mar 2020 01:23:05 -0400 Received: from mail-qv1-f68.google.com ([209.85.219.68]:37054 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgCTFXE (ORCPT ); Fri, 20 Mar 2020 01:23:04 -0400 Received: by mail-qv1-f68.google.com with SMTP id n1so2372557qvz.4 for ; Thu, 19 Mar 2020 22:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=41MFQc5i5QqXVpDWq9ZYXUbE2CVVgETOjycHGMDMWqs=; b=Rh2ff9SLf4vSPUFkTUXvFS2o2lF5aEPJs4RDohEXctpwNpe9dAf4jXaJ12cyO6WCiZ 8lgH/uMnZOk5Xg9+iwFq4MxQBvorqfUjKzAWu1tDXETyyE3plCUkYYnjTrfV5vlnkRAC XLcIG2EJTZbrrSDt6kofnTHO989T64aNO9HJtit+NpsuRkuP2KJLk8kxebz/ftXFeAkq Oje68Q17gtdPlwBG8kmYe+/+5UXb0QeHKxJhKjS9+Ecje/icUbkuRtJ8QONw6JMT+4Ap 2qhCxHU1LEyxtLg4V3IjXB4fIDwAMlwcxoQ3CeRq+z2oPZM7Zva4DTY/qwC6RFrXcDaB gHTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=41MFQc5i5QqXVpDWq9ZYXUbE2CVVgETOjycHGMDMWqs=; b=BT1TgpVdUY868Vkhaey0cLisq1iB8G0hPG3fFKTGSmwf/iwy+E53fBWXl2+vfGkHt8 wn0INeR/oHEpkfamI6El296/tXuS68HAVBS3KNfKrVwt3ofKNlMoIFGil6tSdr8E9hoU bb9gOT5ZQ4ncjNJPrj9lXNDa6zHxDcgY0hLBiJTGrc4o5ILsOQJjFnJq5q9X9b71RkNV Cb2zLOgNLxGKxBE68qzN+lJrsx1I3gTqtc63TtKoSWgJzqDWYs8Whf+LpUHerpwIkJAC vlBlAbUO65vKZCM1m70q5z9Nork4URg8pwxBseWCTW7QgttbMA6KzBK8ryOtdc+IBCcB QlyA== X-Gm-Message-State: ANhLgQ0fAWnr91zve9nh3BsKeFJIM7Agp9D8YmQ1BBhaZAQjXn9c6tZG 0j3erwVGQhOxRH4On6X7LE11HLOm X-Google-Smtp-Source: ADFU+vsXXfY9G8ZohEfImhG1DHv5QUMxVK+Vk/qZMfRSMpSQ0ptUdOs+aqhfjkvJo7ukFm9e74jZVg== X-Received: by 2002:ad4:44a7:: with SMTP id n7mr6169076qvt.152.1584681783180; Thu, 19 Mar 2020 22:23:03 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:02 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Chen Yu , Len Brown Subject: [PATCH 03/10] tools/power turbostat: Support Tiger Lake Date: Fri, 20 Mar 2020 01:22:41 -0400 Message-Id: <4bf7132a0ace8888398af8cec6485ee4c6db5ea8.1584679387.git.len.brown@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Chen Yu From a turbostat point of view, Tiger Lake looks like Ice Lake. Signed-off-by: Chen Yu Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index fa95a8ca5565..d2c3f294da2d 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4616,6 +4616,8 @@ unsigned int intel_model_duplicates(unsigned int model) case INTEL_FAM6_ICELAKE_L: case INTEL_FAM6_ICELAKE_NNPI: + case INTEL_FAM6_TIGERLAKE_L: + case INTEL_FAM6_TIGERLAKE: return INTEL_FAM6_CANNONLAKE_L; case INTEL_FAM6_ATOM_TREMONT_D: From patchwork Fri Mar 20 05:22:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448421 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BDEEA139A for ; Fri, 20 Mar 2020 05:23:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D9A620773 for ; Fri, 20 Mar 2020 05:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681786; bh=sSYkkK2ryNa7GWp6o3Xey0qL2YcW6zPs+Qee40KekhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=1/z2ScUw9dzYKMUApx6Wmfrm9sMwpOrpseuTl3uPwcZwQVsCTtNFV8JqVXQRiu4zB tyqBW8r8bd4IaTD4WFGoo+p/1rLW76ad7M9WALoH/D6yszI++DRMjR0nYcSfbtI9NC V3ueO6i8inKUCtmg3slXp3eO5LAxqsMeT8/lW0h4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725883AbgCTFXG (ORCPT ); Fri, 20 Mar 2020 01:23:06 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:39546 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTFXG (ORCPT ); Fri, 20 Mar 2020 01:23:06 -0400 Received: by mail-qt1-f194.google.com with SMTP id f20so4001116qtq.6 for ; Thu, 19 Mar 2020 22:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=7FcOp/sgWLl2793MNlnRQpX9CI+8SvdKRappctIhTtY=; b=RFvmu3HDoP4LcYMwUQaCws4qyhKYuEWnrPyVEThUpqDQNLZR7q1mwq6K9dsiQhjFo0 I5nmRVFE1uEXyCPLYF4MpJY5w7hvLcyfTge9Du9y0kBsusVxBAOZrtIoK0tZ++ojIdnH wZjQSl2W8kRx6ProSnExihqHiEn4kWWXphz6Wb8xrhf8hczyulQHJGv3lJoSwrfMcs2I t5zNebRzHmaSRAumzYIrrU0uppLkGro5+R1YsFN9IG/3Ugd04c8HE2sRUTiypPY9q3u5 5CfyWp0Sb6FTfvXVF3oaLxf81Qpm7+VdjCHqoSARhNv5R2N2B98MAADA4Un/MNnjXrkR plhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=7FcOp/sgWLl2793MNlnRQpX9CI+8SvdKRappctIhTtY=; b=ks9MOgFLXThgDjoVXS6AM/VkHaF6p2WZ6s4dLp7ugQ2pL14qLXH1sl78ZrBjrUKItc Bfbn6sbSRGsyX/tNQ0ZRoNshoF0HFtGK6uxaRTrQK2ZUry1vggZBvrFT/rtbBDHDCU67 4BUASbP0GREfUUr1YeX720MMfwOEgqDk83s/OTJSLLVxR948HKZHD6Y8E/y2fbCXbZsR 1IoJZyhzRBvOCH37+mENkVa5Iez4lyDozA06hP3Z0ZljsqqE5vz6e0kDPbxLYxLZQ/DH DWd9VPcjEYmW27knMl1hPBl0vSvjQd63I0SjcBYAuReK5P5HnGx6n7w5O+kPdiCo46Uj ugcw== X-Gm-Message-State: ANhLgQ0Ymt6ATHIdmbWcJ9piXWNJChDpbmA1SEGNkfwpOKj5g3xOpg/s sOHZ3sibRHNm6KqgwRsMS86NrAIq X-Google-Smtp-Source: ADFU+vubhRDK9VQfHiBo16Ux8bHyjhXDNYsmw3vN+A8JhgnApeGVFbSlFXvQfMc2F7KIEdU51mFsug== X-Received: by 2002:aed:2625:: with SMTP id z34mr6710768qtc.276.1584681784422; Thu, 19 Mar 2020 22:23:04 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:03 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Chen Yu , Len Brown Subject: [PATCH 04/10] tools/power turbostat: Support Ice Lake server Date: Fri, 20 Mar 2020 01:22:42 -0400 Message-Id: <23274faf96500700da83c4f0ff12d78ae03d5604.1584679387.git.len.brown@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Chen Yu From a turbostat point of view, Ice Lake server looks like Sky Lake server. Signed-off-by: Chen Yu Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index d2c3f294da2d..26088b2a27cc 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4622,6 +4622,9 @@ unsigned int intel_model_duplicates(unsigned int model) case INTEL_FAM6_ATOM_TREMONT_D: return INTEL_FAM6_ATOM_GOLDMONT_D; + + case INTEL_FAM6_ICELAKE_X: + return INTEL_FAM6_SKYLAKE_X; } return model; } From patchwork Fri Mar 20 05:22:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448423 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B0B2139A for ; Fri, 20 Mar 2020 05:23:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 696D520775 for ; Fri, 20 Mar 2020 05:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681787; bh=jCbKyDvPkRjAJ5wIbIVJ1XEuYLYi0Oq1HtRDnKFD0n4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=zVuqr2JAK0IYP9b71kMacKjoEB0br+5bNf3CBeTCFEhOYjPLhr8sce3EEYs62VzON ft3WRSEu/jn3swm6iSPReUenDXq3I0o9t93PxSgkemIM6lqIGkDasaoerW1RDGuonm WvWl6NGji6d5yvnNShvE4ydwkyMS9fXMmxUlRa7k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726892AbgCTFXH (ORCPT ); Fri, 20 Mar 2020 01:23:07 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38321 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTFXG (ORCPT ); Fri, 20 Mar 2020 01:23:06 -0400 Received: by mail-qk1-f194.google.com with SMTP id h14so5736349qke.5 for ; Thu, 19 Mar 2020 22:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=Kgy3nHrtHVFvpakh6OjnW7F1z3CYkEhOyxCVAShYdjg=; b=e0n1xEUzdPjZTRB0TcJcomo5xZZP/p+B11xKgKqa2zMetz6DjW2kJfHgo38cbbR3Ai nS5xqP3T+Rgudk2szMZslfOr7OgX4DjOrIOBs6g2HCXbeCxGJMdmRIVf7dDJSS4ZEaLB dBRfWMKTLNCdrHQGDzZ6o2VqJrQ4KxYEYa4m8kb9NsBziXCmR0LsL7ioQSiZUnY+j2Ez 5wWc2oc8cTFlrcrUSUiTWW+Pmi05JEYm5x7pR1TQLj7XbNmY6F848HTPfWVJ6Qr5UpBL ZmO1QAW69cNmyta10O/C2vx0LHJiI8siVGX01a4TOEP9KqNttm+DGlrGyMjGefdgCCOH PANw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=Kgy3nHrtHVFvpakh6OjnW7F1z3CYkEhOyxCVAShYdjg=; b=Z/gF1qT+Woq45eo37rfwXsIZef1/hWab/xdFPDaYPtztInf2KcjgsJ0+YTaPfZOnJx u3yMJhw8BKb5LD5FnjmxM5m2OXwvnRnr2u8ygAbNCAuz3s/zKQn7kVpxSHMlrhGPHrHt BAMXILyBs6pkg4AsW2XJDtL7UeIJUasbkG4nT5DVQHzMcckhPoWTE6pE/Jj4ZEp7bhLd Unk/LHW9uQKWNKP1HWaoa9SoBkAwvfc4Bs3v5P4IuK+pngIQy3CiopnWahmeG0EgIb6l g/oKWsBlKaIioDr/ZiJya4cjRVqQkqruGtQlPgO/mcghWIWazzJPwNh9JrDcwADc3Qg1 KAMA== X-Gm-Message-State: ANhLgQ2S6rXpdrEMYdE0QN8xdJQRPIt7UUt3MA+Z2TpZGIZqPb+nFFMa 9olnM5BNz7vid13aCJr4MjC1r/P7 X-Google-Smtp-Source: ADFU+vtjs5v0lzb374hBRkTxq64Dl7tWMXBjTe3hnQxHmdoys6sdvRHHHiWcTxY7codDo+K1aG19tg== X-Received: by 2002:a37:aec3:: with SMTP id x186mr6253704qke.419.1584681785628; Thu, 19 Mar 2020 22:23:05 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:05 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Chen Yu , Len Brown Subject: [PATCH 05/10] tools/power turbostat: Support Jasper Lake Date: Fri, 20 Mar 2020 01:22:43 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Chen Yu Jasper Lake, like Elkhart Lake, uses a Tremont CPU. So reuse the code. Signed-off-by: Chen Yu Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 26088b2a27cc..e953afb2e7a1 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -4623,6 +4623,9 @@ unsigned int intel_model_duplicates(unsigned int model) case INTEL_FAM6_ATOM_TREMONT_D: return INTEL_FAM6_ATOM_GOLDMONT_D; + case INTEL_FAM6_ATOM_TREMONT_L: + return INTEL_FAM6_ATOM_TREMONT; + case INTEL_FAM6_ICELAKE_X: return INTEL_FAM6_SKYLAKE_X; } From patchwork Fri Mar 20 05:22:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448425 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E08FF139A for ; Fri, 20 Mar 2020 05:23:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF97420773 for ; Fri, 20 Mar 2020 05:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681788; bh=1GsYU2RSWHIc2KPhuBD9gd3Z/LTit7xO2oiC+WzMm0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=y0R73eXNL1PNsRunGuytMuU7HpI56VcaQjQro7mDUYJeG4+NyA6+kDDNlyYvtVswY OpuMxA8e225GmCOzf0R72oGRKpJ4/pX69d0jrVFPLvlTWwIVx9sFRakIhVolbdiPeM yaujf123qZP1he7ZvxycK9b6GThzRER9JSiJiM54= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbgCTFXI (ORCPT ); Fri, 20 Mar 2020 01:23:08 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:39548 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTFXI (ORCPT ); Fri, 20 Mar 2020 01:23:08 -0400 Received: by mail-qt1-f193.google.com with SMTP id f20so4001153qtq.6 for ; Thu, 19 Mar 2020 22:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=Csf6bpTD787DMKpbGi/HCmUvLLM5wbP7kubCge/V+JI=; b=GKL/21kiyH6Ijy+HiTm4FhUuL/3ZnIaPh5MRks5H6iWO236Py64ckeVtdF+zZaDYLA ZI0LvuyqVDxUqqbg0Hn4u4uT55LtImOKMohq2T1lkGtvJt1+CB03NtU2aYEVgG+N1lU6 6NDbxF/pLrzsXyFFCEXrLee5pzxxvDr3e0uy5Ffjxg+0pxhE1cgxz4aokI8IsgcwyKfY Ohykfeuk3ER4EYVbKzyH47zKXPEpTJaT6crhqlBegm7WrrWPbJt4jeC7cXTYKomdKyCF LjymoWVdhk5Iv6SVRMEagj0eQguKD8A1QAAOVcgKrgsuod/pkCPbFqoMcD9qdweGlbGr Pn2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=Csf6bpTD787DMKpbGi/HCmUvLLM5wbP7kubCge/V+JI=; b=SibYFFmFPt1mzi1KO2GBXrIqJT+ayE/tAFgfQMmSizHxp3JvBWgdyDwdT+AmE+fSCN Y6S3G0GsXNgX+8vKt1X26ct1WAQvxJuFT0JV0KfR4i4DhsY9RkkdpWyUyxqAqh4IPoow sMbc34Zhp2tAyiC4eTdrwClujfJWKmGjSnGdUCESIaJj2t36XvfdpKziDR4N3McrxVCI KnQu8SHcg+nGr5MoeV41ugUnwc2Hcd19f8Wg6XURBfb/k7ErlbA1eWJEkO9Wo0An3sPR ojfKra7TdGC5e00Tfg8DjzxlHLYEsSdyM0hFLJ08im3pxM+jXHM0zzN/2KzUdPJRYZoC OU2g== X-Gm-Message-State: ANhLgQ1IsZ4ENKGu0ViR2B1rSzqZmQeF7d0Sn2GA/6OkBNDzBs0ZVpAq TFavQWbA1QT71axGtQWbOQkopdm6 X-Google-Smtp-Source: ADFU+vvWI00h2cWIOVdL9vO0wti4wP6c2dskA3DzARBV40AzSh7nshK/k2a+tiSIBxlzlHJehLPWBw== X-Received: by 2002:aed:2c06:: with SMTP id f6mr6382584qtd.337.1584681786827; Thu, 19 Mar 2020 22:23:06 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:06 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Chen Yu , Len Brown Subject: [PATCH 06/10] tools/power turbostat: Support Elkhart Lake Date: Fri, 20 Mar 2020 01:22:44 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Chen Yu From a turbostat point of view the Tremont-based Elkhart Lake is very similar to Goldmont, reuse the code of Goldmont. Elkhart Lake does not support 'group turbo limit counter' nor C3, adjust the code accordingly. Signed-off-by: Chen Yu Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 31 ++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index e953afb2e7a1..761146c4f9bc 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3265,6 +3265,7 @@ int probe_nhm_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: case INTEL_FAM6_ATOM_GOLDMONT_D: /* DNV */ + case INTEL_FAM6_ATOM_TREMONT: /* EHL */ pkg_cstate_limits = glm_pkg_cstate_limits; break; default: @@ -3336,6 +3337,17 @@ int is_skx(unsigned int family, unsigned int model) } return 0; } +int is_ehl(unsigned int family, unsigned int model) +{ + if (!genuine_intel) + return 0; + + switch (model) { + case INTEL_FAM6_ATOM_TREMONT: + return 1; + } + return 0; +} int has_turbo_ratio_limit(unsigned int family, unsigned int model) { @@ -3894,6 +3906,20 @@ void rapl_probe_intel(unsigned int family, unsigned int model) else BIC_PRESENT(BIC_PkgWatt); break; + case INTEL_FAM6_ATOM_TREMONT: /* EHL */ + do_rapl = RAPL_PKG | RAPL_CORES | RAPL_CORE_POLICY | RAPL_DRAM | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_GFX | RAPL_PKG_POWER_INFO; + if (rapl_joules) { + BIC_PRESENT(BIC_Pkg_J); + BIC_PRESENT(BIC_Cor_J); + BIC_PRESENT(BIC_RAM_J); + BIC_PRESENT(BIC_GFX_J); + } else { + BIC_PRESENT(BIC_PkgWatt); + BIC_PRESENT(BIC_CorWatt); + BIC_PRESENT(BIC_RAMWatt); + BIC_PRESENT(BIC_GFXWatt); + } + break; case INTEL_FAM6_SKYLAKE_L: /* SKL */ case INTEL_FAM6_CANNONLAKE_L: /* CNL */ do_rapl = RAPL_PKG | RAPL_CORES | RAPL_CORE_POLICY | RAPL_DRAM | RAPL_DRAM_PERF_STATUS | RAPL_PKG_PERF_STATUS | RAPL_GFX | RAPL_PKG_POWER_INFO; @@ -4295,6 +4321,7 @@ int has_snb_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: case INTEL_FAM6_ATOM_GOLDMONT_D: /* DNV */ + case INTEL_FAM6_ATOM_TREMONT: /* EHL */ return 1; } return 0; @@ -4324,6 +4351,7 @@ int has_c8910_msrs(unsigned int family, unsigned int model) case INTEL_FAM6_CANNONLAKE_L: /* CNL */ case INTEL_FAM6_ATOM_GOLDMONT: /* BXT */ case INTEL_FAM6_ATOM_GOLDMONT_PLUS: + case INTEL_FAM6_ATOM_TREMONT: /* EHL */ return 1; } return 0; @@ -4882,7 +4910,8 @@ void process_cpuid() do_slm_cstates = is_slm(family, model); do_knl_cstates = is_knl(family, model); - if (do_slm_cstates || do_knl_cstates || is_cnl(family, model)) + if (do_slm_cstates || do_knl_cstates || is_cnl(family, model) || + is_ehl(family, model)) BIC_NOT_PRESENT(BIC_CPU_c3); if (!quiet) From patchwork Fri Mar 20 05:22:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448427 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5344139A for ; Fri, 20 Mar 2020 05:23:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A457D20773 for ; Fri, 20 Mar 2020 05:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681790; bh=DfWGUI/YRBC+QoiSb9mI/WDtstzZZl0zXRyZ3giisYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=k26bFb31ybF4USHITH3R2LWuohOywB92I78JLUifuoLQv/NU8OT40OjB/B0mngz/o N/awQQEUzgIy8XiC9NaqytesVFN54t3Hm8UyDvAGcV5HF1TzK4EprSCrPbOR3kgmiU 2rth+f+PvnmEYHZghIiUJR0HdfdNGK62t7Zc3TBQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726894AbgCTFXK (ORCPT ); Fri, 20 Mar 2020 01:23:10 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:45414 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbgCTFXK (ORCPT ); Fri, 20 Mar 2020 01:23:10 -0400 Received: by mail-qt1-f195.google.com with SMTP id z8so3964574qto.12 for ; Thu, 19 Mar 2020 22:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=wi1k/IuAlSMQ0sD08Rluy7qCovjgpl4TLmxMEPLrgCI=; b=VcRrHxEKrxJc/jUHv0LxovHX/jrDt9JvcdzvUkkOBTe34rVhONiUz+oFX4sXEuN+U4 zInN9aPQxkAcQ7+Uw+c2abwNgIKI0QlmziNccqEzAQxvpkGUTXwikzEhk5bnDHvVP0cu q4/H1tx406b34If84wjUcfBhk4HjQzf5cWuUt3tlhi7C9T2luQAU8gvJUdd+4SKFLUeC d4bF9Fcrdq05qbOYFd1kE4Dd9lv11Fmogyzvvqq0pnM67O3kTzcgz07csXgjN817BBQm /XIuyrhnkulpB1AyxVsk1CjCdY7Q97iMdd165QCAz/NmtpM+RRp+H1x/4zOJqgjFiMZk Yeig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=wi1k/IuAlSMQ0sD08Rluy7qCovjgpl4TLmxMEPLrgCI=; b=VuJKmV9WSoRJdLRpatSv9x0dd7/XsmwovEnAYYihIRYJPAlF5AGtBnn4kHGpK8NF2c v6yGvbR09wjecoUP46lb+iEjIgnCAlovnZcVSoUB+peGd+NeCBxfFKFRnaqZ8a0RIdLk q+9DBIl+5NDuhP5qXLdLy0+WUjYzrxpEj3JVy4XASANjNlEfNWkCywZ0qB5Lh7lzwTPx M9hhhlbgzNIg88Wokj187W7aG3+OJHTrwTtZ+SDcV/Z+cgVD1cuYT9dtcrXsiBSbbLtz +81nTiVzWWCaclDZAmbuvmO4Hiig6pij/LnbZqz8N77UjN6uwTowggL5IHVWD3bKerWT Ting== X-Gm-Message-State: ANhLgQ1AiR3NC2blZGMOAKoLdhn6MEpDueEEMXaJ0osGVLc3ObNy6Gyl /YHc9inssITNOgezPQonVN7n621e X-Google-Smtp-Source: ADFU+vtJ1CVSTuSYNL+DFPTnyAU+7CLu5HOGMumxbON5+pljo2V015tolTCoJKCCjNzpuV7NYQMQgg== X-Received: by 2002:ac8:3656:: with SMTP id n22mr6553067qtb.296.1584681788095; Thu, 19 Mar 2020 22:23:08 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:07 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Len Brown Subject: [PATCH 07/10] tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks Date: Fri, 20 Mar 2020 01:22:45 -0400 Message-Id: <1f81c5efc020314b2db30d77efe228b7e117750d.1584679387.git.len.brown@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown Some Chromebook BIOS' do not export an ACPI LPIT, which is how Linux finds the residency counter for CPU and SYSTEM low power states, that is exports in /sys/devices/system/cpu/cpuidle/*residency_us When these sysfs attributes are missing, check the debugfs attrubte from the pmc_core driver, which accesses the same counter value. Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 761146c4f9bc..3ecbf709a48c 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -304,6 +304,10 @@ int *irqs_per_cpu; /* indexed by cpu_num */ void setup_all_buffers(void); +char *sys_lpi_file; +char *sys_lpi_file_sysfs = "/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us"; +char *sys_lpi_file_debugfs = "/sys/kernel/debug/pmc_core/slp_s0_residency_usec"; + int cpu_is_not_present(int cpu) { return !CPU_ISSET_S(cpu, cpu_present_setsize, cpu_present_set); @@ -2916,8 +2920,6 @@ int snapshot_gfx_mhz(void) * * record snapshot of * /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us - * - * return 1 if config change requires a restart, else return 0 */ int snapshot_cpu_lpi_us(void) { @@ -2941,17 +2943,14 @@ int snapshot_cpu_lpi_us(void) /* * snapshot_sys_lpi() * - * record snapshot of - * /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us - * - * return 1 if config change requires a restart, else return 0 + * record snapshot of sys_lpi_file */ int snapshot_sys_lpi_us(void) { FILE *fp; int retval; - fp = fopen_or_die("/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us", "r"); + fp = fopen_or_die(sys_lpi_file, "r"); retval = fscanf(fp, "%lld", &cpuidle_cur_sys_lpi_us); if (retval != 1) { @@ -4946,10 +4945,16 @@ void process_cpuid() else BIC_NOT_PRESENT(BIC_CPU_LPI); - if (!access("/sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us", R_OK)) + if (!access(sys_lpi_file_sysfs, R_OK)) { + sys_lpi_file = sys_lpi_file_sysfs; BIC_PRESENT(BIC_SYS_LPI); - else + } else if (!access(sys_lpi_file_debugfs, R_OK)) { + sys_lpi_file = sys_lpi_file_debugfs; + BIC_PRESENT(BIC_SYS_LPI); + } else { + sys_lpi_file_sysfs = NULL; BIC_NOT_PRESENT(BIC_SYS_LPI); + } if (!quiet) decode_misc_feature_control(); From patchwork Fri Mar 20 05:22:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448429 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4395139A for ; Fri, 20 Mar 2020 05:23:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2E4B20739 for ; Fri, 20 Mar 2020 05:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681791; bh=0B1kgrRAaeYnTUUcX1KSJ8Xgf79BYPRBOxtgN7qPkKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=d9xTDIfGuL7HNcJc/40A6JMNGJHTjZNJILmV5j5+8ceBA+BFtcXjZbQVII9BsBbQ9 rYWA+2t+32zgouaT2URm5myo6orwnUcvzmA6fcx8ttRMaUpr2L87mo1+bh+UD5dWBN nrxPG6gjc8TBNp45Xb0VIK9c571RSunXTmLSbQEU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgCTFXL (ORCPT ); Fri, 20 Mar 2020 01:23:11 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:42422 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbgCTFXL (ORCPT ); Fri, 20 Mar 2020 01:23:11 -0400 Received: by mail-qk1-f193.google.com with SMTP id e11so5704298qkg.9 for ; Thu, 19 Mar 2020 22:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=u7fqq9R71dpjrIomT6zK23AIJpwrHJ8YljxAyx/5uGE=; b=jkojP7/6Z74ittioC6CuL9IA58uzMms85+h5WFmdz1dcak1f62IoZqz0MSu+sUbLwe M02GMMmqVyDUiAzua7eygmWlY2mw01WxuyOUqUlKFJR0uDSpSvHM6TJBFOGE5VcI+3TJ aMAbMkbeE0vvnctCy6BOE5srmjDrFpr6Re5MCkwi9BnyCAfLdKN22P2AkCyCHqvhg0v/ whJUoKQwIFjxSsLxg+CiAYPejqUSO+Tof/zJaBDoIzTGR1noySaiGRhJgPnEdTJzOFdq MpTvuU5az4ZDFzOP8WJ+XGKtdEzbK7VBSeOJync47uVqFnzZujrsMIipGqdnrRYqn0EH 8wxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=u7fqq9R71dpjrIomT6zK23AIJpwrHJ8YljxAyx/5uGE=; b=qBkq57i9g/D5j78mdZtvnb4KKEcHc3ZQtSkIlWm2oAIDfRun+TsTWxh+A+d6hY28IQ oYdf2KXnTdySUJT3GbE8vqmxf39OnDJekDJsMMjNzjVOBmMwPtWzVmSeBDM0l5xkVAKs 5yjp9T4NXjbC0AIDd/xk6T2dL3ZMqUqrPu9V2o3A4+paVv6lb6t+ZTk1YMN1OUdhOaur oH8Dqmv57tlClSHgsV8Oo/c+twVpa3yijXYzPM5RZUd7vftVh/a9mRDmeGaBLskzz5Nz tzhMYa82RIj62B2DTn0Gb01d1Y29EUeUSrDfRqLlB/Z4JlO+0XnCu+nQ+qCmqECKsc0L FcBA== X-Gm-Message-State: ANhLgQ3kWYQlnVsgPahGWNVMSYFNl3s3rPG9gGBhdd2WF8IRyQLBSwrl Pn7CTSiMgrr492aqGupElpelTLTk X-Google-Smtp-Source: ADFU+vvr7aSsEmtlu/c15Ja2pR/bvLD/2a90hXcnpvFJeizMx7L0aX3LNz9tqWb/lJPin0SYYz6Z6w== X-Received: by 2002:a37:393:: with SMTP id 141mr6307468qkd.393.1584681789394; Thu, 19 Mar 2020 22:23:09 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:08 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Len Brown Subject: [PATCH 08/10] tools/power turbostat: Fix 32-bit capabilities warning Date: Fri, 20 Mar 2020 01:22:46 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown warning: `turbostat' uses 32-bit capabilities (legacy support in use) Signed-off-by: Len Brown --- tools/power/x86/turbostat/Makefile | 2 +- tools/power/x86/turbostat/turbostat.c | 46 +++++++++++++++++---------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile index 13f1e8b9ac52..2b6551269e43 100644 --- a/tools/power/x86/turbostat/Makefile +++ b/tools/power/x86/turbostat/Makefile @@ -16,7 +16,7 @@ override CFLAGS += -D_FORTIFY_SOURCE=2 %: %.c @mkdir -p $(BUILD_OUTPUT) - $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS) + $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS) -lcap .PHONY : clean clean : diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 3ecbf709a48c..77f89371ec5f 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include @@ -3150,28 +3150,42 @@ void check_dev_msr() err(-5, "no /dev/cpu/0/msr, Try \"# modprobe msr\" "); } -void check_permissions() +/* + * check for CAP_SYS_RAWIO + * return 0 on success + * return 1 on fail + */ +int check_for_cap_sys_rawio(void) { - struct __user_cap_header_struct cap_header_data; - cap_user_header_t cap_header = &cap_header_data; - struct __user_cap_data_struct cap_data_data; - cap_user_data_t cap_data = &cap_data_data; - extern int capget(cap_user_header_t hdrp, cap_user_data_t datap); - int do_exit = 0; - char pathname[32]; + cap_t caps; + cap_flag_value_t cap_flag_value; - /* check for CAP_SYS_RAWIO */ - cap_header->pid = getpid(); - cap_header->version = _LINUX_CAPABILITY_VERSION; - if (capget(cap_header, cap_data) < 0) - err(-6, "capget(2) failed"); + caps = cap_get_proc(); + if (caps == NULL) + err(-6, "cap_get_proc\n"); - if ((cap_data->effective & (1 << CAP_SYS_RAWIO)) == 0) { - do_exit++; + if (cap_get_flag(caps, CAP_SYS_RAWIO, CAP_EFFECTIVE, &cap_flag_value)) + err(-6, "cap_get\n"); + + if (cap_flag_value != CAP_SET) { warnx("capget(CAP_SYS_RAWIO) failed," " try \"# setcap cap_sys_rawio=ep %s\"", progname); + return 1; } + if (cap_free(caps) == -1) + err(-6, "cap_free\n"); + + return 0; +} +void check_permissions(void) +{ + int do_exit = 0; + char pathname[32]; + + /* check for CAP_SYS_RAWIO */ + do_exit += check_for_cap_sys_rawio(); + /* test file permissions */ sprintf(pathname, "/dev/cpu/%d/msr", base_cpu); if (euidaccess(pathname, R_OK)) { From patchwork Fri Mar 20 05:22:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448431 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFBD3139A for ; Fri, 20 Mar 2020 05:23:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF75720774 for ; Fri, 20 Mar 2020 05:23:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681792; bh=OKHrbvYOlw4EVytfCiS9FY7KWSbni72/eZ5/qdYtVTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=k0DvJcY/gz0TtAAPaWNx/TxCZtL5DXV53o8KrLHbzv+LvTOpN4R1THyI2cNyY7ejo J7FcV97lV4GmTieV7/54CuE4kg+MmFPMg1MSBCPsqk5QmSDJVZOPjN59SG42LIUvGZ jcnZNrvlyc6VIeEQSY/PBR72JdrH+odYr+jpUAeM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbgCTFXM (ORCPT ); Fri, 20 Mar 2020 01:23:12 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42753 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgCTFXM (ORCPT ); Fri, 20 Mar 2020 01:23:12 -0400 Received: by mail-qt1-f193.google.com with SMTP id t9so48010qto.9 for ; Thu, 19 Mar 2020 22:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=9w31pVo9yQoAO2jOqhauobcS56RYPSJajRdXocwsTSg=; b=MN21bowByjC91bwqg3e2jOLTv06WM/ndv4qmWDEGfON2Ke7iG2aMvtnfiR+hy9Xop6 woJA5DIlLGDavOiX0etaqSF0VXQEDhQ3ognUvtxOhGUkw3u9smEcYOT4rTV5MXzTv2sM KggfxOm2pvyR70jG7vxE4kwINUiuQu0cNuZKsCndcOndfMiOht2dnOGrG3qms9fohSWQ FgvAV72/1ebL6h5sl/vUmRkE8H5Oh9k995Vz0GaiBfeWLvERW16B3n6waXMqYiAcFm9u +az6rvEpYlHqqiIuKHi7+W6hRfTyq7mIeZOJUyhBZAtEZ26AfKZfsoeyNbofeCPNPLs9 Bi6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=9w31pVo9yQoAO2jOqhauobcS56RYPSJajRdXocwsTSg=; b=edX8j2V+2YhHr2bSVbW6b+oNCYlxv0XRTlLzmUdCXmg5ZffWVYQKPtwQouKn/SCfCs SBADlW1D1djG1PwIn2qj+4DfwSxCd42mwt2JcN7+aSK+1h4kSjGpkeuFY0rPlbKrjPfQ 4omXRsmFM5rAq9WaUkFjCkPFzGoKeFjHMCJF1aTqiZcyuJaV+hFJ+bRjXs8+2xOpakT2 IRKi3WwC2txvmmbWZbmLkx0ecbYOUX77UFOJgZPBGuLVhDmzPiuoavo284im/3jVosVH B59OFHB1glBTqWimNlOMbswdHW6TVqLP3dlSTz58+dYnGnVguB+RUp/9odxyMTDZn0nx tXxw== X-Gm-Message-State: ANhLgQ1C7el0tLeWb3KGeG3xq1E0BOBFfEdMKwQn/Bw1LTzLTyRHtXh6 8U5TEkwM8LL5F34Q3cBLzE9s0nPX X-Google-Smtp-Source: ADFU+vsFQdR9pfxQvtaigjGlgs8oYJg/15SQp2gE33/TYYQzFUF8OPI7CjVk1XfBYzeTmQQJiWBjiw== X-Received: by 2002:aed:21c5:: with SMTP id m5mr6403929qtc.42.1584681790605; Thu, 19 Mar 2020 22:23:10 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:10 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Antti Laakso , Len Brown Subject: [PATCH 09/10] tools/power turbostat: Print cpuidle information Date: Fri, 20 Mar 2020 01:22:47 -0400 Message-Id: <7c3808082a40a96e95808864fe814b4e68238a46.1584679387.git.len.brown@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Antti Laakso Print cpuidle driver and governor. Signed-off-by: Antti Laakso Signed-off-by: Len Brown --- tools/power/x86/turbostat/turbostat.c | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 77f89371ec5f..c9e299e99c2f 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3509,6 +3509,7 @@ dump_sysfs_cstate_config(void) char path[64]; char name_buf[16]; char desc[64]; + char cpuidle_buf[64]; FILE *input; int state; char *sp; @@ -3516,6 +3517,35 @@ dump_sysfs_cstate_config(void) if (!DO_BIC(BIC_sysfs)) return; + if (access("/sys/devices/system/cpu/cpuidle", R_OK)) { + fprintf(outf, "cpuidle not loaded\n"); + return; + } + + sprintf(path, "/sys/devices/system/cpu/cpuidle/current_driver"); + input = fopen(path, "r"); + if (input == NULL) { + fprintf(outf, "NSFOD %s\n", path); + return; + } + if (!fgets(cpuidle_buf, sizeof(cpuidle_buf), input)) + err(1, "%s: failed to read file", path); + fclose(input); + + fprintf(outf, "cpuidle driver: %s", cpuidle_buf); + + sprintf(path, "/sys/devices/system/cpu/cpuidle/current_governor_ro"); + input = fopen(path, "r"); + if (input == NULL) { + fprintf(outf, "NSFOD %s\n", path); + return; + } + if (!fgets(cpuidle_buf, sizeof(cpuidle_buf), input)) + err(1, "%s: failed to read file", path); + fclose(input); + + fprintf(outf, "cpuidle governor: %s", cpuidle_buf); + for (state = 0; state < 10; ++state) { sprintf(path, "/sys/devices/system/cpu/cpu%d/cpuidle/state%d/name", From patchwork Fri Mar 20 05:22:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 11448433 X-Patchwork-Delegate: lenb@kernel.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 121031668 for ; Fri, 20 Mar 2020 05:23:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E52FA20773 for ; Fri, 20 Mar 2020 05:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584681794; bh=TTNs+Ru/uaT7SXBXiRLtBYGfdD1Z0v0hoYEMtuiFoTI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:List-ID: From; b=Y/FbrZ+3Xiqy7XxdO3Mbr0ylxEX5ZmmnfAPDy8Uaqj9RsPnQp5GdVs0iXrCwMIpUQ w4o6mlcQeo48HPSsw9evDZbkE3xZ/toQN6/RR9Ugd/lubnAC/VFdWySFNEUIs+izMJ hjdATQ7QuT2QAZZc8+OUwPDsa2/J6y4FJlptcWD4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgCTFXN (ORCPT ); Fri, 20 Mar 2020 01:23:13 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:35292 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgCTFXN (ORCPT ); Fri, 20 Mar 2020 01:23:13 -0400 Received: by mail-qk1-f194.google.com with SMTP id d8so5764763qka.2 for ; Thu, 19 Mar 2020 22:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:reply-to:organization:content-transfer-encoding; bh=QnlRKFwb6riwoS45t1kwNYmNbBxnCagIRb1lQuIyqno=; b=PLaMcinLzMdgtH+ixV2oIxXQ1ZTqyBNyptoc5To7KwuCm+LKJY6OSFIt8z1LX5XE84 +7U260xQbjvw8ZH2SoD4X/VHVzPfRfW1G4Jp+KhRD5AoN5jc6mBhNJJ00eSH0YhAC71n mxqaMyjCl44LN4/CWt7aKa+8SsCBshC7YaFSqRcjGhF+sh9QuJGxrv6E2qkgcG5QXoIs /SwqbsiMetRT+rVJbs3f3HMPWDiegYAw/dp6H54pzARWrba3WyYdXdukDAx/X1eMi96O jj+sutBUrNYjDOwSsYs4tIOKGYtX9goOhA3WN+WLps0lZH+B9+LkRqrTEmJhve/IKgcA Wfkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:reply-to:organization :content-transfer-encoding; bh=QnlRKFwb6riwoS45t1kwNYmNbBxnCagIRb1lQuIyqno=; b=ED1p5stpeul7QHv38YGdxy4FSO5xXL93/DbPdAtlFC2FVdbLRNPPsk9K8kJGHJXJ1w 0HV776giEuYvpZG0+3URS3ywm8UrlmTVj+z8ce9Ntg9ohZY2WIHGFdwv9lFjAQ/18u5k /DjAOr1TNPoUp8BplHURwiqWK3GdLyhO39ZFklV6/1djycilpuUMiMpNtIbHW3q4f/w+ nhgaw0fZS7FSNfWtj4HnUhhcQXpk8qBZcM1vWQLan0WKcuqJiOaC6QuFKB1rgYnRLVXN cJ8BnLT5ICH+HbrdJN3t/P+LiukTpFzJU/vqUfO1ZUsUa2azjVzTswxLkGYPyMGFPxL8 B7hw== X-Gm-Message-State: ANhLgQ3J4hIOQfE7tFYCSIjf4h4rBOXeixvC9H2Pg4srgrC27r0ZSkhS FPY8qGa4HtF8X4QE0DaMsPhlQdeF X-Google-Smtp-Source: ADFU+vuRKhpPOOvXNA8xLTQIFiz+iOWawg0I6rbUVNcDz4U8lKrN3dT+9wGpfy7kyiFEjKo2Dsztdg== X-Received: by 2002:a37:64d6:: with SMTP id y205mr6445652qkb.346.1584681791770; Thu, 19 Mar 2020 22:23:11 -0700 (PDT) Received: from localhost.localdomain (h96-61-82-19.cntcnh.dsl.dynamic.tds.net. [96.61.82.19]) by smtp.gmail.com with ESMTPSA id w134sm3273383qka.127.2020.03.19.22.23.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Mar 2020 22:23:11 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Len Brown Subject: [PATCH 10/10] turbostat: update version Date: Fri, 20 Mar 2020 01:22:48 -0400 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> References: <081c54323b27d8d4b40df6b2375b9e1f6846d827.1584679387.git.len.brown@intel.com> MIME-Version: 1.0 Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Len Brown A stitch in time saves nine. Signed-off-by: Len Brown --- 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 c9e299e99c2f..399b2c3b095c 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -5394,7 +5394,7 @@ int get_and_dump_counters(void) } void print_version() { - fprintf(outf, "turbostat version 19.08.31" + fprintf(outf, "turbostat version 20.03.19" " - Len Brown \n"); }