This is a note to let you know that I've just added the patch titled platform/x86/intel/tpmi: Add defines to get version information to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: platform-x86-intel-tpmi-add-defines-to-get-version-i.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1a8eb174588d1d6ae644bce20d1fbf0ffe59a6db Author: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> Date: Tue Oct 3 11:49:14 2023 -0700 platform/x86/intel/tpmi: Add defines to get version information [ Upstream commit 8874e414fe78718d0f2861fe511cecbd1cd73f4d ] Add defines to get major and minor version from a TPMI version field value. This will avoid code duplication to convert in every feature driver. Also add define for invalid version field. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20231003184916.1860084-2-srinivas.pandruvada@xxxxxxxxxxxxxxx Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> Stable-dep-of: 1d390923974c ("powercap: intel_rapl_tpmi: Ignore minor version change") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/include/linux/intel_tpmi.h b/include/linux/intel_tpmi.h index 04d937ad4dc4f..ee07393445f9f 100644 --- a/include/linux/intel_tpmi.h +++ b/include/linux/intel_tpmi.h @@ -6,6 +6,12 @@ #ifndef _INTEL_TPMI_H_ #define _INTEL_TPMI_H_ +#include <linux/bitfield.h> + +#define TPMI_VERSION_INVALID 0xff +#define TPMI_MINOR_VERSION(val) FIELD_GET(GENMASK(4, 0), val) +#define TPMI_MAJOR_VERSION(val) FIELD_GET(GENMASK(7, 5), val) + /** * struct intel_tpmi_plat_info - Platform information for a TPMI device instance * @package_id: CPU Package id