public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	markgross@kernel.org,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	 platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: ISST: Allow reading core-power state on HWP disabled systems
Date: Thu, 29 Feb 2024 14:32:50 +0200 (EET)	[thread overview]
Message-ID: <23b62f29-902c-800a-1cd4-6e24d70abd86@linux.intel.com> (raw)
In-Reply-To: <20240229002659.1416623-1-srinivas.pandruvada@linux.intel.com>

On Wed, 28 Feb 2024, Srinivas Pandruvada wrote:

> When HWP (Hardware P-states) is disabled, dynamic SST features are
> disabled. But user should still be able to read the current core-power
> state, with legacy P-states. This will allow users to read current
> configuration with static SST enabled from BIOS.
> 
> To address this, do not call disable_dynamic_sst_features() when the
> request is for reading the state.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Is this a fix? (It's lacking the tag if it is).

-- 
 i.

> ---
>  drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> index 2662fbbddf0c..1d918000d72b 100644
> --- a/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> +++ b/drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c
> @@ -462,10 +462,10 @@ static long isst_if_core_power_state(void __user *argp)
>  	struct tpmi_per_power_domain_info *power_domain_info;
>  	struct isst_core_power core_power;
>  
> -	if (disable_dynamic_sst_features())
> +	if (copy_from_user(&core_power, argp, sizeof(core_power)))
>  		return -EFAULT;
>  
> -	if (copy_from_user(&core_power, argp, sizeof(core_power)))
> +	if (core_power.get_set && disable_dynamic_sst_features())
>  		return -EFAULT;
>  
>  	power_domain_info = get_instance(core_power.socket_id, core_power.power_domain_id);
> 


  reply	other threads:[~2024-02-29 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29  0:26 [PATCH] platform/x86: ISST: Allow reading core-power state on HWP disabled systems Srinivas Pandruvada
2024-02-29 12:32 ` Ilpo Järvinen [this message]
2024-02-29 15:11   ` srinivas pandruvada
2024-02-29 21:18 ` Kuppuswamy Sathyanarayanan
2024-03-04 13:17 ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23b62f29-902c-800a-1cd4-6e24d70abd86@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox