Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4235642pxb; Tue, 26 Jan 2021 16:36:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQBJSK02dRk0/XV6kgPGQCFeONZPTus+tiYFjTaOogSTl+DzIus7Cn3xVeqcZN6B0Jb8FL X-Received: by 2002:a05:6402:3508:: with SMTP id b8mr6619980edd.341.1611707766539; Tue, 26 Jan 2021 16:36:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611707766; cv=none; d=google.com; s=arc-20160816; b=Bhx4cR5ROJLkzSlOIvf8wyErbn4dF/jnfy9oqJpUwTXSwzJZpUH6XXQxKHFQRY5Z7J 0jjxBFI2+kdS3HR8tLvhwZ9fLI0xOXeZ1irs7+MlgYAE0WpBMAu5apg2CJ3M740F+4f4 c2JvRcZURcKgwHfRj6XV8+PlswFXkL7hpB+gRhjNAuXuuoJVTh0bVW9F5dK2HhaVgo3e Ot1wT67bnT/+nMvCnZgj24cBEzgPhBxdT6rXQFYG0V8BWTvk8zm2hR2f7ZrVM/IWsZjp xOVW1/N6OUxFoGhjR/JXVOQjfF53KO/Ilie1BL3kH1Elu6ALK5pd+lCFMib58o8Px+kO oPGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=BdN+glEVgeYhnUo2SFc/y+zPoJzWySqh9gKW4wQ+MUc=; b=rceoOPPgRStb8Wjus34llmFInrzQ5GyHK2vkpFkf8YHsy2kFtysd5br9b8PyEdIV4y yHFgPJfrJDri6Ch3lXPk18pKpwJGn9QqbhS8hswEwWA8W91It/ZYIuacadiik5sk1Iy0 Zm7Ubo5Zl7tcWHouB8ROsrq5hKeRXHW/vfssSGL+68MoG8HO2lZ+FbPkGB6my+JrnrH/ 5C2yw6tjIWUgG8YD76F2+mNiO/UWli7fuwY08tkiAnmRTQCxXLxsKxebtOEmvJtdQD51 Gom/aKAdONW0YPGaGFmFsSdUYPmiguRf8Dd9S9ilCHGyN+T6OdnxS2PTJROreXSzBJBI fcxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=g2NzyrdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si109249edj.169.2021.01.26.16.35.42; Tue, 26 Jan 2021 16:36:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=g2NzyrdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404102AbhA0ASN (ORCPT + 99 others); Tue, 26 Jan 2021 19:18:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728513AbhAZRIE (ORCPT ); Tue, 26 Jan 2021 12:08:04 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0605C061A29 for ; Tue, 26 Jan 2021 08:45:47 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id e22so34871111iog.6 for ; Tue, 26 Jan 2021 08:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BdN+glEVgeYhnUo2SFc/y+zPoJzWySqh9gKW4wQ+MUc=; b=g2NzyrdO8qJc9gCmNX6MMT+uVx9heLOB8e6cxKjT4RRCRVRezEQsRZrty72bZ8jTbG ePCn51fae/rChUFBImBy+iN7wS30ENu0xAo9KS1sojNC3/8dez9eHbWjCURFPdXyBPj6 zvsxX2Pl5YqHPLyWJ3N/f4gB6V10Ynpd0TmWg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BdN+glEVgeYhnUo2SFc/y+zPoJzWySqh9gKW4wQ+MUc=; b=FyUSgjlfMAXi9A+ijsUjRhVh/RdFGoFsJ3M+d2L48spvINoA9jJ5/OoHP2LFAakjPL cZdzBSSQ/GHhnzzf3Yjluty8AfGIEF6sdJMuWVQ4/nIS/0iY+9or6HQ9UIXKwcw7ILrZ /EJSOo2GMVFc0R3tZHL6aqbQ24qfWYT+CvIJ2jWmWtZGRUoye4O8ZRaCx71SfFF1lRZP f/UPRMBvo3AH3YumuG8mKuEzHk88Gjv2R4fxy4yvjcNtYzd326ctvhtHsK8XpT1cxvEE fKoaWrzy1L3KWO5UY/zdWilDRwjS2vYPqUFdAV94JRF9D7XCeL3tbLvc4VQGyZ3ezsMd fdOg== X-Gm-Message-State: AOAM532hHKHzVko0ceW0lJ3rCZbW3aSl9UhNcQIxZD/LAyyByDa24U9L ijbiWYEftpdFdUUfcoJGobshvw== X-Received: by 2002:a05:6e02:507:: with SMTP id d7mr5097817ils.133.1611679547103; Tue, 26 Jan 2021 08:45:47 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id v2sm11205221ilj.19.2021.01.26.08.45.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jan 2021 08:45:46 -0800 (PST) Subject: Re: [PATCH v2 0/8] cpupower: Updates and cleanup to support AMD Family 0x19 To: Nathan Fontenot , rrichter@amd.com, shuah@kernel.org, linux-kernel@vger.kernel.org, trenn@suse.com, linux-pm@vger.kernel.org Cc: boris.ostrovsky@oracle.com, joao.m.martins@oracle.com, konrad.wilk@oracle.com, Shuah Khan References: <161159600371.68367.14890273216040482793.stgit@ethanol01c7-host.amd.com> From: Shuah Khan Message-ID: Date: Tue, 26 Jan 2021 09:45:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <161159600371.68367.14890273216040482793.stgit@ethanol01c7-host.amd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/25/21 10:34 AM, Nathan Fontenot wrote: > Updates to the cpupower command to add support for AMD family 0x19 > and cleanup the code to remove many of the family checks to hopefully > make any future family updates easier. > > The first couple of patches are simple updates to rename the structs > in the msr_pstate union to better reflect current support and correcting > the name of the CPUPOWER_CAP_AMD_CPB cpuid cap flag. > > Patches 3, 5, and 8 update the family checks to either replace > them with a new cpuid cap flag based off of cpuid checks or check for > family >= 0x17 where removing the direct family check isn't possible. > > The reamianing patches are cleanups to remove unneeded extra enabled bit > checking, remove passing no longer used variables, and remove unused > variables in decode_pstates(). > --- > > Updates for v2: > - Patch 1/8: Add links to AMD PPR and BKDG to commit message. > - Patch 3/8: Update and add back removed comment. > > --- > > Nathan Fontenot (7): > cpupower: Update msr_pstate union struct naming > cpupower: Add CPUPOWER_CAP_AMD_HW_PSTATE cpuid caps flag > cpupower: Remove unused pscur variable. > cpupower: Update family checks when decoding HW pstates > cpupower: Condense pstate enabled bit checks in decode_pstates() > cpupower: Remove family arg to decode_pstates() > cpupower: Add cpuid cap flag for MSR_AMD_HWCR support > > Robert Richter (1): > cpupower: Correct macro name for CPB caps flag > > > tools/power/cpupower/utils/cpufreq-info.c | 3 - > tools/power/cpupower/utils/helpers/amd.c | 65 ++++++++++++-------------- > tools/power/cpupower/utils/helpers/cpuid.c | 20 +++++++- > tools/power/cpupower/utils/helpers/helpers.h | 14 +++--- > tools/power/cpupower/utils/helpers/misc.c | 9 +--- > 5 files changed, 57 insertions(+), 54 deletions(-) > > -- > Nathan Fontenot > Thank you. Applied now for 5.12-rc1 https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower thanks, -- Shuah