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=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 7E867C4320A for ; Mon, 26 Jul 2021 20:04:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65CFC60F6D for ; Mon, 26 Jul 2021 20:04:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232742AbhGZTXs (ORCPT ); Mon, 26 Jul 2021 15:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232274AbhGZTXr (ORCPT ); Mon, 26 Jul 2021 15:23:47 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1174AC061760 for ; Mon, 26 Jul 2021 13:04:16 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id 48-20020a9d0bb30000b02904cd671b911bso11202867oth.1 for ; Mon, 26 Jul 2021 13:04:16 -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=/UJ/PgAf9rpspIdYUyy6W0XNumgiVgXfjlUArwaqmlE=; b=S1p9g1qr1nxZ/RtAJmEQaKmuV9HF7p49a6Sr5UXPPsn669XOAnJxrhZXEkfkdUjDav 89v2EiSuE1/YwPgdzzgT1R2PUVLBEtoFQM2HcsXEPkFgWj2ZJCj34bKQ7EPm8ALCIiW0 IJ1uwaVJovWtvkWwdNKKR/+sBmtRBL9oTPJZU= 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=/UJ/PgAf9rpspIdYUyy6W0XNumgiVgXfjlUArwaqmlE=; b=lnIrK9MqTCKZRr0CAYDumEHuLMuwg7XiQ9lxcx5xvDOUmPZqrYcXELuMtknW3zUz27 lxteZGTnU6LIreQn4KrtpxB02dh5NEhFgfrjdqM2nvTOPWECWYZ7R+igimypkqBmh7wV EUrTa23LgIwbdKsTs4M4k9zTYB+FJsYnChidRl2/uUqHq/2CO6D5N9BXj8bs+TjHHWaF MtOxDj0rELiCREMxTJWPZtyV8c2OVrmQCvX7ARSc9bxn9JfCKD2HGHBgkXbvthU7kVAk koTYRwG481SpzejhDYC8ThN8B7vNhZGnyAzumR4LIv+Hzwiw6pY8K+DKKPqKJ664dUwn ugQQ== X-Gm-Message-State: AOAM530tjnjyWPwgKuAfwU80ml4eqO2n623JEZXSQY9M57xkuFa3ykj3 eCH19t1qrmSztYAWwxpgxzb6IBAkyDpIjg== X-Google-Smtp-Source: ABdhPJxh6yZ28zBf0PUAfviAH/W4yXT6zxb1eFDrTtGKIhv4eKO/Sd9TdIWuaOMPRNq91YNAgKUGjA== X-Received: by 2002:a05:6830:7:: with SMTP id c7mr13295153otp.313.1627329855429; Mon, 26 Jul 2021 13:04:15 -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 x38sm160557ott.42.2021.07.26.13.04.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 13:04:14 -0700 (PDT) Subject: Re: [PATCH v3 1/2] cpupower: Fix amd cpu (family < 0x17) active state issue To: =?UTF-8?B?5b6Q56aP5rW3?= , shuah@kernel.org, Thomas Renninger Cc: xufuhai , lishujin@kuaishou.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: From: Shuah Khan Message-ID: Date: Mon, 26 Jul 2021 14:04:14 -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=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/23/21 12:23 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 > > Reported-by: yangrui > Signed-off-by: xufuhai > Signed-off-by: chenguanqiao > Signed-off-by: lishujin Please use your full names for the Signed-off-by - similar to the way you would sign a legal document. thanks, -- Shuah