From nobody Fri Apr 3 00:00:15 2026 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 F08243233ED; Wed, 25 Mar 2026 19:29:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774466953; cv=none; b=JMqF0gJUdVQRGCnJXq8i6UNukQCxYiFA4MfpJt2P8mW5utNQru7CPRtfzf2qlXebmaF/ptogSVIARrNbwWtqdvFIv0UVK14gn3zRQvFDonJFnwzupnBzFcMIh5g+AxbIhU1fTgZSok9JWZt8IWV0Im/dWRIFWve3S7E6KLxdZa0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774466953; c=relaxed/simple; bh=L4jELdZiW+yzICSJhXuJ2ZU9mk1EByn80HKLZkT4cOA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=M/+4mlZzRAQC8sPOOMRgOqNBsBzEyPuJae27qnvezOv3Ixj0D5+fjVBLK8fFN/e2hd1WtG9In943/DgDvvPHGRBi3YnzyQGPYvKXi6Znyo9AInMvOzHvrkbbCLQo2qBeCsM7Ebo4aNRuB1Udd++jph6+QiIKO/0RVMlYTylgPt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NGEZAvwX; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NGEZAvwX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774466952; x=1806002952; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=L4jELdZiW+yzICSJhXuJ2ZU9mk1EByn80HKLZkT4cOA=; b=NGEZAvwX8c6BGBSn5pjF4jL0HxtdI7gnjHHs0SEPtXUwTNF13dTePFDc c8bH6HIZKkYxhTFeXpvYTolvCjGEejC3Gt4VvKs8ivHqQuuvK0WWMVpGu nSOrhOMVbMKebE7FkzNakrrtHXpk14ziI1lvrZ8btAPa3K1MT+EdIKPkE CLQ9fXp3Sx+dfANoCDLE3VV0t5orBNDa+qrQ5DESQ+a/bbhlenVQOfNDq 9f9HlFesb20fpHKpave7ZqP/twoQpRHHhkam/trLl6BkfDRaSTeQy6CKd xV/2vq3D6ah2OeIdhLtfiRlLDVcwXRfv55/qV5ezLyCEwKGzd1VEfIwey g==; X-CSE-ConnectionGUID: j2+32zDZTAe6FKQfQnWQEg== X-CSE-MsgGUID: ZQ1MGXGwRrCKSnraVJbWPg== X-IronPort-AV: E=McAfee;i="6800,10657,11740"; a="98136697" X-IronPort-AV: E=Sophos;i="6.23,140,1770624000"; d="scan'208";a="98136697" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2026 12:29:11 -0700 X-CSE-ConnectionGUID: e6+Jgx5tRCKnr9KO23nptQ== X-CSE-MsgGUID: JynbSqVwR7Ow7e6YH5x7qw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,140,1770624000"; d="scan'208";a="248253996" Received: from spandruv-desk.jf.intel.com ([10.54.55.20]) by fmviesa001.fm.intel.com with ESMTP; 25 Mar 2026 12:29:11 -0700 From: Srinivas Pandruvada To: hansg@kernel.org, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Pandruvada , stable@vger.kernel.org Subject: [PATCH] platform/x86/intel-uncore-freq: Handle autonomous UFS status bit Date: Wed, 25 Mar 2026 12:29:09 -0700 Message-ID: <20260325192909.3417322-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the AUTONOMOUS_UFS_DISABLED bit is set in the header, the ELC (Efficiency Latency Control) feature is non-functional. Hence, return error for read or write to ELC attributes. Fixes: bb516dc79c4a ("platform/x86/intel-uncore-freq: Add support for effic= iency latency control") Signed-off-by: Srinivas Pandruvada Cc: stable@vger.kernel.org --- Not urgent: In any current generations, it is never the case. .../x86/intel/uncore-frequency/uncore-frequency-tpmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-t= pmi.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c index 1237d9570886..b038dbb69447 100644 --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c @@ -537,6 +537,7 @@ static void set_cdie_id(int domain_id, struct tpmi_unco= re_cluster_info *cluster_ #define UNCORE_VERSION_MASK GENMASK_ULL(7, 0) #define UNCORE_LOCAL_FABRIC_CLUSTER_ID_MASK GENMASK_ULL(15, 8) #define UNCORE_CLUSTER_OFF_MASK GENMASK_ULL(7, 0) +#define UNCORE_AUTONOMOUS_UFS_DISABLED BIT(32) #define UNCORE_MAX_CLUSTER_PER_DOMAIN 8 =20 static int uncore_probe(struct auxiliary_device *auxdev, const struct auxi= liary_device_id *id) @@ -598,6 +599,7 @@ static int uncore_probe(struct auxiliary_device *auxdev= , const struct auxiliary_ =20 for (i =3D 0; i < num_resources; ++i) { struct tpmi_uncore_power_domain_info *pd_info; + bool auto_ufs_enabled; struct resource *res; u64 cluster_offset; u8 cluster_mask; @@ -647,6 +649,8 @@ static int uncore_probe(struct auxiliary_device *auxdev= , const struct auxiliary_ continue; } =20 + auto_ufs_enabled =3D !(header & UNCORE_AUTONOMOUS_UFS_DISABLED); + /* Find out number of clusters in this resource */ pd_info->cluster_count =3D hweight8(cluster_mask); =20 @@ -689,7 +693,8 @@ static int uncore_probe(struct auxiliary_device *auxdev= , const struct auxiliary_ =20 cluster_info->uncore_root =3D tpmi_uncore; =20 - if (TPMI_MINOR_VERSION(pd_info->ufs_header_ver) >=3D UNCORE_ELC_SUPPORT= ED_VERSION) + if (TPMI_MINOR_VERSION(pd_info->ufs_header_ver) >=3D + UNCORE_ELC_SUPPORTED_VERSION && auto_ufs_enabled) cluster_info->elc_supported =3D true; =20 ret =3D uncore_freq_add_entry(&cluster_info->uncore_data, 0); --=20 2.52.0