platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] platform/x86/intel-uncore-freq: Check write blocked for ELC
@ 2025-07-27 21:05 Srinivas Pandruvada
  2025-08-12 12:28 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Pandruvada @ 2025-07-27 21:05 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen
  Cc: platform-driver-x86, linux-kernel, Srinivas Pandruvada, stable

Add the missing write_blocked check for updating sysfs related to uncore
efficiency latency control (ELC). If write operation is blocked return
error.

Fixes: bb516dc79c4a ("platform/x86/intel-uncore-freq: Add support for efficiency latency control")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
---
Non urgent patch. It can go through regular merge window even if it has fix tag.
This is not a current production use case.

Rebased on
https://kernel.googlesource.com/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
for-next

 .../x86/intel/uncore-frequency/uncore-frequency-tpmi.c       | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
index 6df55c8e16b7..bfcf92aa4d69 100644
--- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
+++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
@@ -192,9 +192,14 @@ static int uncore_read_control_freq(struct uncore_data *data, unsigned int *valu
 static int write_eff_lat_ctrl(struct uncore_data *data, unsigned int val, enum uncore_index index)
 {
 	struct tpmi_uncore_cluster_info *cluster_info;
+	struct tpmi_uncore_struct *uncore_root;
 	u64 control;
 
 	cluster_info = container_of(data, struct tpmi_uncore_cluster_info, uncore_data);
+	uncore_root = cluster_info->uncore_root;
+
+	if (uncore_root->write_blocked)
+		return -EPERM;
 
 	if (cluster_info->root_domain)
 		return -ENODATA;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] platform/x86/intel-uncore-freq: Check write blocked for ELC
  2025-07-27 21:05 [PATCH] platform/x86/intel-uncore-freq: Check write blocked for ELC Srinivas Pandruvada
@ 2025-08-12 12:28 ` Ilpo Järvinen
  0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-08-12 12:28 UTC (permalink / raw)
  To: Hans de Goede, Srinivas Pandruvada
  Cc: platform-driver-x86, linux-kernel, stable

On Sun, 27 Jul 2025 14:05:13 -0700, Srinivas Pandruvada wrote:

> Add the missing write_blocked check for updating sysfs related to uncore
> efficiency latency control (ELC). If write operation is blocked return
> error.
> 
> 


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/intel-uncore-freq: Check write blocked for ELC
      commit: dff6f36878799a5ffabd15336ce993dc737374dc

--
 i.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-12 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-27 21:05 [PATCH] platform/x86/intel-uncore-freq: Check write blocked for ELC Srinivas Pandruvada
2025-08-12 12:28 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).