From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E288FC63797 for ; Thu, 22 Jul 2021 15:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA1976135B for ; Thu, 22 Jul 2021 15:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232656AbhGVOkv (ORCPT ); Thu, 22 Jul 2021 10:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232591AbhGVOhr (ORCPT ); Thu, 22 Jul 2021 10:37:47 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21490C0613CF for ; Thu, 22 Jul 2021 08:18:21 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id b6so5644312iln.12 for ; Thu, 22 Jul 2021 08:18:21 -0700 (PDT) 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=NI1tkVPHHCoVNKoha3MwqOvNjOSw9sWtWtPdC8h3zH4=; b=Ahn32Cse8RzK3iPlUhzEXMgCqlvtSlil4ECp75F5+sIaZ02CcWWp9/Vd+RcRBiYgAc 93II+fSGzfGxh82aVjM64byakIpTqHX62IghtE6b5xsu1RYBFcHOka8xRRbgXrx+h8o8 apYS0erZEFF0VBhVVxk4aFiSs6ee3qCc0EIdI= 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=NI1tkVPHHCoVNKoha3MwqOvNjOSw9sWtWtPdC8h3zH4=; b=cm/ARnWJhAPDbroGVwcsqp+bpy5aXJNKMuocizNsxeElWzdyONvceSQqXVKyDBJYCF uGVucqXIXVtaTCIepI6GSjj9ZAXchzxBoo60H1OTArh64Uyl0O5KYxUrNNwB93WUZ2rq sgB2H1Socglo5x5FY6D+CRrxoZkFRM9DDBjGGopvacQrQ5v+DvcQr76iY/16unUc4sYs yYtw9laseOtIMVBzc4dg+YNl+3FDfjs3pZdCw/P22WPRVi7/h7eSIUHFkzyWZj9ACSsS 6B9khqyruJ3sz6cti2LwpNDm2xgB/q45yI9Ggy0le89NfNpP+AK4Ip1wN1RiLlY1Vmwn joeA== X-Gm-Message-State: AOAM5326CgagvPU9ntfzct1z1qiGje1DlUT3S0P2rsFhUwQ2saNnEzs5 jXy4skXkoxq5ayQ5SnpwHvuLWA== X-Google-Smtp-Source: ABdhPJxPORMVGq60hUklsfidz/YTKslTfwxtHpvsxEKSZRelKAXW+THXMg90COpcDtEtyUVxutzd8w== X-Received: by 2002:a05:6e02:170c:: with SMTP id u12mr261404ill.116.1626967100492; Thu, 22 Jul 2021 08:18:20 -0700 (PDT) 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 e14sm14805326ilq.32.2021.07.22.08.18.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Jul 2021 08:18:20 -0700 (PDT) Subject: Re: [PATCH v2 1/2] cpupower: Fix amd cpu (family < 0x17) active state issue To: =?UTF-8?B?5b6Q56aP5rW3?= , shuah@kernel.org, Thomas Renninger Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, lishujin@kuaishou.com, xufuhai , Shuah Khan References: From: Shuah Khan Message-ID: Date: Thu, 22 Jul 2021 09:18:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/30/21 12:58 AM, Ð츣º£ wrote: > From: xufuhai > > For the old AMD processor (family < 0x17), cpupower will call the > amd_pci_get_num_boost_states function, but for the non-root user > pci_read_byte function (implementation comes from the psutil library), > val will be set to 0xff, indicating that there is no read function > callback. At this time, the original logic will set the cpupower turbo > active state to yes. This is an obvious issue~ > > Reproduce procedure: > cpupower frequency-info > Please resend this patch and the following from the same address as the Signed-off-by. https://patchwork.kernel.org/project/linux-pm/patch/2dccdf57-1546-e55e-2efe-3ac91ed7f043@gmail.com/ thanks, -- Shuah