From patchwork Sun Jun 25 03:13:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 9807923 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E34F46088A for ; Sun, 25 Jun 2017 03:13:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DFD527F9F for ; Sun, 25 Jun 2017 03:13:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8297328396; Sun, 25 Jun 2017 03:13:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2777027F9F for ; Sun, 25 Jun 2017 03:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751108AbdFYDNM (ORCPT ); Sat, 24 Jun 2017 23:13:12 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:36361 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbdFYDNL (ORCPT ); Sat, 24 Jun 2017 23:13:11 -0400 Received: by mail-qt0-f194.google.com with SMTP id v31so5948086qtb.3 for ; Sat, 24 Jun 2017 20:13: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 :in-reply-to:references:reply-to:organization; bh=GV3T4MgySgI3aSO0e8b7ukNRq6PjwmN7kLmAbqHO0XQ=; b=QhOKIY1qjXX25lCkmh3HKhySplWbblzwGYCr+5Bvpza0lZEDsEDK2qiK2iUr03pW+U PtXde9wsmdMxoSvb3JtdOEVbkxW0lYu7yGb4eF0RvfJ5N6sTnBHBPB4RYKlQMWEhGHr2 03biZhwwmAyK6e0f4JjuGhIn8axeTlAbAgncb7euDOxyEe7fm16thtpy4bRnPn2AVaZ2 Dba5ZxhL4gUMSfiXifvmqrmHnaWmzOYpChpIhyJiE4vx3hCtICeRK2LxXuOIkPV17HzN RQFdxQ9fRWx18+WAwJ/hjxDxEUuaF/pfOfkkBNwv4JXQTAHYRb2h+MtzLF+UUzOc9eN0 /DDg== 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:in-reply-to:references:reply-to:organization; bh=GV3T4MgySgI3aSO0e8b7ukNRq6PjwmN7kLmAbqHO0XQ=; b=YxucN/YCYB6amo5c+jLiBk0CLDISxNeXSfrrR+c917kkSQjRPeW2m8AkrMnaMkl4A9 7g4aANdVZE3PFDbrSb/1IX1bbepSfYoUYNnKrkzSKOW3UT3hzt/7qtxbvF9L9NzWll0w JWfxpNoIOj+4jdFLan7oP9QNH0kvfUdUajWetLpWJgb0Wf27tM0/RY45NoH8+syCy0F8 KfUBA59yMCAgpAH2xzLA8PrRIb1Y9qjgjshDDesk8gMMvSSNUev4kUYwBjTjPQH0+XPS Fv++AZR2VSHavzgipGJF9XA4GAFAnkWuR0hFDZuM8m8reFzSSGqfsV+fEGBgjiNnKayh quTA== X-Gm-Message-State: AKS2vOwrOUKnL7XVmKr0tYjHj2iZRyGzHUn5M7+HYs6eiOPGH0OILGW9 NxQEgCVl4fN/aw6c X-Received: by 10.237.51.227 with SMTP id v90mr13874709qtd.144.1498360390812; Sat, 24 Jun 2017 20:13:10 -0700 (PDT) Received: from localhost.localdomain (pool-173-48-65-169.bstnma.fios.verizon.net. [173.48.65.169]) by smtp.gmail.com with ESMTPSA id o76sm6158770qke.7.2017.06.24.20.13.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Jun 2017 20:13:10 -0700 (PDT) From: Len Brown To: linux-pm@vger.kernel.org Cc: Len Brown Subject: [PATCH 4/5] tools/power turbostat: decode MSR_IA32_MISC_ENABLE only on Intel Date: Sat, 24 Jun 2017 20:13:00 -0700 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498360381-10293-1-git-send-email-lenb@kernel.org> References: <1498360381-10293-1-git-send-email-lenb@kernel.org> In-Reply-To: References: 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 X-Virus-Scanned: ClamAV using ClamSMTP From: Len Brown otherwise, turbostat bails on on AMD Opteron boxes: turbostat: cpu26: msr offset 0x1a0 read failed: Input/output error Reported-by: Kamil Kolakowski 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 1a3a5b4..33992a9 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -3943,6 +3943,9 @@ void decode_misc_enable_msr(void) { unsigned long long msr; + if (!genuine_intel) + return; + if (!get_msr(base_cpu, MSR_IA32_MISC_ENABLE, &msr)) fprintf(outf, "cpu%d: MSR_IA32_MISC_ENABLE: 0x%08llx (%sTCC %sEIST %sMWAIT %sPREFETCH %sTURBO)\n", base_cpu, msr,