Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1573454rdb; Wed, 31 Jan 2024 02:53:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPSL+pk60Fu01peb3mIvASjfgETFVkzNs9p5kVlbPWeu4UU95JOoQufgjOlj8a783rG1pS X-Received: by 2002:a05:6a20:6608:b0:19e:34ea:36ab with SMTP id n8-20020a056a20660800b0019e34ea36abmr998583pzh.16.1706698409921; Wed, 31 Jan 2024 02:53:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706698409; cv=pass; d=google.com; s=arc-20160816; b=LmVpXxzI6WNEc9fJ4PwW4Lh7yb/KCycle8iTmFdFkkckOKm053J+UfhkZYoOxXOa0/ yfQRkRQlh0B4ZJ9ml5rlbRTpri/5jV799CzenWf98HZDiSmrwkwvXGYSBtbewGS2nefP mc42QWeG1kCxISrxbbtOKKM14uzLnsuh8L1nQxZguxGE0hhPE95de80UwHpHNuJMe7M3 IPx6WIVrHLVqDMVmpbDQrzbp1JNS6OWDE6jETac9yBMJorkosfgvB8l9TUZ4I2Fn6OZv v49mIwEe7MBQnSNPTG8tfwSsylkkYt2ubOLzbG6a2/GqLYy9wHhE6kVqpmSS72PHWrX7 kDug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=ydFUhUQE4zxHxs8BSLB3vzgOF3bdbXI+DgDyrWs+GcA=; fh=OOAXDrifvsNO36GypQnwl/jGOTI771cz0HZDhyEig4Q=; b=CTbw2r2LPOklth7F8S27erg+ZUQZmzkYnQLMNN//JcLmWxbNp1NVXnCniPZ9fBtcsd WxZ1W+Q708X0NJC9k2QId16/MxPoPaV2QcpbNX25urK4/hIH1k8hIn3Nuie00yoxzfWi ZjaQHQLp9/EWIazps2njqbq/8g2RbZmoC1vJq4LL3WpWEWHUEHqeH5f+lgfeSRiWhC5d mEQ+gLRCvZEf9lZR7qdfXD5nKUz7XeMdrwX3SMC6Ns8V+SFKeV1W33/6ln71eMY5lKEf HRwhgRdGJAo0T7WMsYo1XZ6gaL5gshn0JFPNoYo5gw/Mf7r81GZO6gmq73o2THJ8L4oA FlHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=zhaoxin.com); spf=pass (google.com: domain of linux-kernel+bounces-46268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46268-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXE4On51DAWdm/IEx1cO5fYWYlKyYQ0HxFtpMomEAjj4LIpm4DK1+s5Vqlu0e7rlN4YJiPot6VfNXmSg0yUfKHj2RFaBW9bQMOkn942kg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id hq22-20020a056a00681600b006dde09d957dsi9342168pfb.16.2024.01.31.02.53.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 02:53:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=zhaoxin.com); spf=pass (google.com: domain of linux-kernel+bounces-46268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46268-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 93C0F29B71B for ; Wed, 31 Jan 2024 10:53:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74C7078676; Wed, 31 Jan 2024 10:52:22 +0000 (UTC) Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [203.110.167.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD820762DD for ; Wed, 31 Jan 2024 10:52:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.110.167.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698341; cv=none; b=aXUvWGEyp5IKc5CKpG2z8azwNPqJBqaIlI66UVGlDSdcItuZQwrEhMBbb4+kWyzrKXeFmgGidQZOVTN7cFzqckFaSPW/lsQuPUpkcTZv/ZRfWKX6Y3ik+3AyQnKTTitAJLTZU0UH14Kpeky8QcvEMEfOiLCGpGjhKFeSu5w4SgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698341; c=relaxed/simple; bh=SuEx50UjR4mvtKc/+qIPahjt8xlsD0d8Sb1tSW2xFKI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ZN6/nfQ2hHUztYWlrNI+k/lLBnf9ZRKBFs8CXPIAOuEkKFFb3VW4KWA/Ncr9GwhpONKRSX2ksPXEQwOlrdlNsBokN41B7lP7L4O60kxNyyWzDX3VVFhZgVxoQyA1s9y/abb6UPwIBiYa8mUIkaZ8JMakfzPtgdzCkbWkZxoJOGY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com; spf=pass smtp.mailfrom=zhaoxin.com; arc=none smtp.client-ip=203.110.167.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zhaoxin.com X-ASG-Debug-ID: 1706698334-1eb14e0c7d326b0001-xx1T2L Received: from ZXSHMBX2.zhaoxin.com (ZXSHMBX2.zhaoxin.com [10.28.252.164]) by mx2.zhaoxin.com with ESMTP id PwrBgcLIFe8NDdPk (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 31 Jan 2024 18:52:14 +0800 (CST) X-Barracuda-Envelope-From: TonyWWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.164 Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHMBX2.zhaoxin.com (10.28.252.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 31 Jan 2024 18:52:13 +0800 Received: from [10.32.57.248] (10.32.57.248) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 31 Jan 2024 18:52:11 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.28.252.164 Message-ID: X-Barracuda-RBL-Trusted-Forwarder: 10.32.57.248 Date: Wed, 31 Jan 2024 18:52:10 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] ACPI: CPPC: Add get the highest perf register value support Content-Language: en-US X-ASG-Orig-Subj: Re: [PATCH 1/3] ACPI: CPPC: Add get the highest perf register value support To: Ricardo Neri CC: , , , , , , , , , , , , , , , , , , , , References: <20231228075705.26652-1-TonyWWang-oc@zhaoxin.com> <20231228075705.26652-2-TonyWWang-oc@zhaoxin.com> <20240117220742.GC13777@ranerica-svr.sc.intel.com> From: Tony W Wang-oc In-Reply-To: <20240117220742.GC13777@ranerica-svr.sc.intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Barracuda-Connect: ZXSHMBX2.zhaoxin.com[10.28.252.164] X-Barracuda-Start-Time: 1706698334 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 1550 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.120187 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On 2024/1/18 06:07, Ricardo Neri wrote: > > [这封邮件来自外部发件人] > > On Thu, Dec 28, 2023 at 03:57:03PM +0800, Tony W Wang-oc wrote: >> Add function cppc_get_highest_perf in generic CPPC driver to get the >> highest perf register value for specified core. >> >> Signed-off-by: Tony W Wang-oc >> --- >> drivers/acpi/cppc_acpi.c | 13 +++++++++++++ >> include/acpi/cppc_acpi.h | 5 +++++ >> 2 files changed, 18 insertions(+) >> >> diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c >> index 7ff269a78c20..1a77c514d007 100644 >> --- a/drivers/acpi/cppc_acpi.c >> +++ b/drivers/acpi/cppc_acpi.c >> @@ -1154,6 +1154,19 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf) >> return cppc_get_perf(cpunum, NOMINAL_PERF, nominal_perf); >> } >> >> +/** >> + * cppc_get_highest_perf - Get the highest performance register value. >> + * @cpunum: CPU from which to get highest performance. >> + * @highest_perf: Return address. >> + * >> + * Return: 0 for success, -EIO otherwise. >> + */ >> +int cppc_get_highest_perf(int cpunum, u64 *highest_perf) >> +{ >> + return cppc_get_perf(cpunum, HIGHEST_PERF, highest_perf); >> +} >> +EXPORT_SYMBOL_GPL(cppc_get_highest_perf); > The Intel P-State driver uses cppc_get_perf_caps(). You would not need to > export this function. > > Having said that, the Intel P-State driver could also use this new > function, IMO. AFAICS, it does not *have* to use cppc_get_perf_caps(). Yes, you are right.