Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/x86/intel/tpmi: Move TPMI ID definition

Move TPMI ID definitions to common include file. In this way other
feature drivers don't have to redefine.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231204221740.3645130-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Srinivas Pandruvada and committed by
Hans de Goede
046d7be6 72dd14d2

+13 -13
-13
drivers/platform/x86/intel/tpmi.c
··· 171 171 } __packed; 172 172 173 173 /* 174 - * List of supported TMPI IDs. 175 - * Some TMPI IDs are not used by Linux, so the numbers are not consecutive. 176 - */ 177 - enum intel_tpmi_id { 178 - TPMI_ID_RAPL = 0, /* Running Average Power Limit */ 179 - TPMI_ID_PEM = 1, /* Power and Perf excursion Monitor */ 180 - TPMI_ID_UNCORE = 2, /* Uncore Frequency Scaling */ 181 - TPMI_ID_SST = 5, /* Speed Select Technology */ 182 - TPMI_CONTROL_ID = 0x80, /* Special ID for getting feature status */ 183 - TPMI_INFO_ID = 0x81, /* Special ID for PCI BDF and Package ID information */ 184 - }; 185 - 186 - /* 187 174 * The size from hardware is in u32 units. This size is from a trusted hardware, 188 175 * but better to verify for pre silicon platforms. Set size to 0, when invalid. 189 176 */
+13
include/linux/intel_tpmi.h
··· 12 12 #define TPMI_MINOR_VERSION(val) FIELD_GET(GENMASK(4, 0), val) 13 13 #define TPMI_MAJOR_VERSION(val) FIELD_GET(GENMASK(7, 5), val) 14 14 15 + /* 16 + * List of supported TMPI IDs. 17 + * Some TMPI IDs are not used by Linux, so the numbers are not consecutive. 18 + */ 19 + enum intel_tpmi_id { 20 + TPMI_ID_RAPL = 0, /* Running Average Power Limit */ 21 + TPMI_ID_PEM = 1, /* Power and Perf excursion Monitor */ 22 + TPMI_ID_UNCORE = 2, /* Uncore Frequency Scaling */ 23 + TPMI_ID_SST = 5, /* Speed Select Technology */ 24 + TPMI_CONTROL_ID = 0x80, /* Special ID for getting feature status */ 25 + TPMI_INFO_ID = 0x81, /* Special ID for PCI BDF and Package ID information */ 26 + }; 27 + 15 28 /** 16 29 * struct intel_tpmi_plat_info - Platform information for a TPMI device instance 17 30 * @package_id: CPU Package id