Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp42421rdb; Wed, 17 Jan 2024 16:35:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2FgkUz3qPKvv3THtbx1AWNJ5OsKSwstvsZcPlTuMX/L2YRxFb7m/QvaHsynHGleT+CTXz X-Received: by 2002:a05:622a:103:b0:42a:3fe:b280 with SMTP id u3-20020a05622a010300b0042a03feb280mr25526qtw.36.1705538108348; Wed, 17 Jan 2024 16:35:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705538108; cv=pass; d=google.com; s=arc-20160816; b=V7wFlLKxIUD7UGtknoOkz8gH7kD0XFSdZV0LiFMOFXjiRv81VMnPS0nyLpYbM8/Equ 59X7cGNd3Dh5cSaCkCc+C9ddyJwd9LT4E++AonISXtSuOgImN3AtkIbxR1Doqr/0XLTH 201ZdakiDAx7O+YgUtA9s9FYB5vbohiz3avekU6Bo2LBouRgs7+sSk/HNiwCqGsC2YF9 gSAQwieeTO06TL5SkEChJGu5d8E1tazChbLnj9bLWcYKliImAlgIxMdZ5AreJDoGObiL ZPXimvxrVfTckSFj1j3PS9eSJp4fdj1vCxPXG/DIIJjwfPUC/mmyjRGa09k5Z8rSjKUA S2sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=L14bp9rJCPCEjYFRKD/gQc7KLw2DOSFgs+VK35z6rNk=; fh=e5xrC8srPf2SgCTQHQTkCtmXmOkTSeCNnCmavQaNJm4=; b=cVpXOAJ5tfwhH+2VX4mHSCIX60ta2p50880rI4B9AUt5QPSTOumtdKyoMYiMSWWLeO 7HhfhYxmoN+Vyub3B1E4h2s2Ee9Qip48buemBA0bvke7hUhHOmwaR6Df36DJoeTxehJE lk+ZAODs0N2kAlJvVMyJLIX4c7XXYWPoFxx66mrdWlCASeLIDaKm9ktPAWkS3ihekKix OOu2+/b2pAQCj+CrflkXs0VfzjWjJ2nJhWbuUwPvBJUuWpCJFAu/u8Za76GjAXBPf0cY xlDr0+W7jN4RaN618tOLWQdbUoWfYq27RXW744IGfy9yJCeFjoqNbu+TtQCI+9uHTNN4 0mlQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Tvwo6hTy; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-29478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f7-20020a05620a280700b0077d7cbd1c38si13566459qkp.251.2024.01.17.16.35.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 16:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Tvwo6hTy; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-29478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29478-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3DB9E1C21C8C for ; Wed, 17 Jan 2024 22:06:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 522D5286B4; Wed, 17 Jan 2024 22:06:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Tvwo6hTy" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 C77FD225A1; Wed, 17 Jan 2024 22:06:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705529176; cv=none; b=P7kzLr3afNdpMc2xFBPolEgQMXLGEKR6KFncTLgpCFKUh9+wQh4NHfl9d0IjpTODudR4dY8rw1wD5DNFsLsxIDRupWwydfCqEwHC6GaQzGmBKVjC0enUvxvQcKSYtjHLeZx7KjQSd6Fy5tGUR9r6A1NwwmmQAxW88MyT9U0b5uQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705529176; c=relaxed/simple; bh=5REtFEFzeTkryYu5lbfVoHopMCN9cMkQmbOfiJWDWso=; h=DKIM-Signature:X-IronPort-AV:X-IronPort-AV:Received:X-ExtLoop1: X-IronPort-AV:X-IronPort-AV:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=uPg72wF+G73yUOfIFfgA7wj/iCUkZgSvc29j4/ojEC4a6i2ep4xhNExSBF/BarDLFUJ8xUW8xbQ6QI5AZtJ3F0JPWNx7BxKG+Fthx3JFeE4MnJehMaHqoLz4gZj7jwtq+NffJFoi1IxM4GiUUpvaOSPq/nCHiWQ2UM8QYHAU+Go= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Tvwo6hTy; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705529174; x=1737065174; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5REtFEFzeTkryYu5lbfVoHopMCN9cMkQmbOfiJWDWso=; b=Tvwo6hTy5e72sKLmWAWCZv59VIxEN8zxutb4P0EZhHlIZOZbavdFTo58 wuD2T2LvWIFIEsdl3sVy7PdCeTsR7aubc2h3pouacteiGS5x2tuJRKf/H Jma0GPhT6Blv5YpNPKVAwZgcoXeCbY2xveQTqm84f38yuoWMy02TUWDAu PB+S56JYBwlvJ7BYGWD8uw4gMQNzpW6pGbaO87fXkbvOY3mPh3pEbwyqY aZEe63TV+mULc9mbtU3XFAsFc+Fx7aDwF4hjvbA19vNFuq8P2DnATflKb 8junSmjXKUi4/IJmq/QBH9ZV9qFoUUwCvlu9USUUnNoTxOTyICDmm0M3d w==; X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="13641586" X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="13641586" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 14:06:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10956"; a="903627804" X-IronPort-AV: E=Sophos;i="6.05,201,1701158400"; d="scan'208";a="903627804" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2024 14:06:12 -0800 Date: Wed, 17 Jan 2024 14:07:42 -0800 From: Ricardo Neri To: Tony W Wang-oc Cc: rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linux.dev, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, mcgrof@kernel.org, peterz@infradead.org, j.granados@samsung.com, viresh.kumar@linaro.org, linux-pm@vger.kernel.org, CobeChen@zhaoxin.com, TimGuo@zhaoxin.com, LeoLiu-oc@zhaoxin.com, LindaChai@zhaoxin.com Subject: Re: [PATCH 1/3] ACPI: CPPC: Add get the highest perf register value support Message-ID: <20240117220742.GC13777@ranerica-svr.sc.intel.com> References: <20231228075705.26652-1-TonyWWang-oc@zhaoxin.com> <20231228075705.26652-2-TonyWWang-oc@zhaoxin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231228075705.26652-2-TonyWWang-oc@zhaoxin.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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().