intel_telemetry_debugfs.c 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056
  1. /*
  2. * Intel SOC Telemetry debugfs Driver: Currently supports APL
  3. * Copyright (c) 2015, Intel Corporation.
  4. * All Rights Reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * This file provides the debugfs interfaces for telemetry.
  16. * /sys/kernel/debug/telemetry/pss_info: Shows Primary Control Sub-Sys Counters
  17. * /sys/kernel/debug/telemetry/ioss_info: Shows IO Sub-System Counters
  18. * /sys/kernel/debug/telemetry/soc_states: Shows SoC State
  19. * /sys/kernel/debug/telemetry/pss_trace_verbosity: Read and Change Tracing
  20. * Verbosity via firmware
  21. * /sys/kernel/debug/telemetry/ioss_race_verbosity: Write and Change Tracing
  22. * Verbosity via firmware
  23. */
  24. #include <linux/module.h>
  25. #include <linux/init.h>
  26. #include <linux/device.h>
  27. #include <linux/debugfs.h>
  28. #include <linux/seq_file.h>
  29. #include <linux/io.h>
  30. #include <linux/uaccess.h>
  31. #include <linux/pci.h>
  32. #include <linux/suspend.h>
  33. #include <asm/cpu_device_id.h>
  34. #include <asm/intel-family.h>
  35. #include <asm/intel_pmc_ipc.h>
  36. #include <asm/intel_punit_ipc.h>
  37. #include <asm/intel_telemetry.h>
  38. #define DRIVER_NAME "telemetry_soc_debugfs"
  39. #define DRIVER_VERSION "1.0.0"
  40. /* ApolloLake SoC Event-IDs */
  41. #define TELEM_APL_PSS_PSTATES_ID 0x2802
  42. #define TELEM_APL_PSS_IDLE_ID 0x2806
  43. #define TELEM_APL_PCS_IDLE_BLOCKED_ID 0x2C00
  44. #define TELEM_APL_PCS_S0IX_BLOCKED_ID 0x2C01
  45. #define TELEM_APL_PSS_WAKEUP_ID 0x2C02
  46. #define TELEM_APL_PSS_LTR_BLOCKING_ID 0x2C03
  47. #define TELEM_APL_S0IX_TOTAL_OCC_ID 0x4000
  48. #define TELEM_APL_S0IX_SHLW_OCC_ID 0x4001
  49. #define TELEM_APL_S0IX_DEEP_OCC_ID 0x4002
  50. #define TELEM_APL_S0IX_TOTAL_RES_ID 0x4800
  51. #define TELEM_APL_S0IX_SHLW_RES_ID 0x4801
  52. #define TELEM_APL_S0IX_DEEP_RES_ID 0x4802
  53. #define TELEM_APL_D0IX_ID 0x581A
  54. #define TELEM_APL_D3_ID 0x5819
  55. #define TELEM_APL_PG_ID 0x5818
  56. #define TELEM_INFO_SRAMEVTS_MASK 0xFF00
  57. #define TELEM_INFO_SRAMEVTS_SHIFT 0x8
  58. #define TELEM_SSRAM_READ_TIMEOUT 10
  59. #define TELEM_MASK_BIT 1
  60. #define TELEM_MASK_BYTE 0xFF
  61. #define BYTES_PER_LONG 8
  62. #define TELEM_APL_MASK_PCS_STATE 0xF
  63. /* Max events in bitmap to check for */
  64. #define TELEM_PSS_IDLE_EVTS 25
  65. #define TELEM_PSS_IDLE_BLOCKED_EVTS 20
  66. #define TELEM_PSS_S0IX_BLOCKED_EVTS 20
  67. #define TELEM_PSS_S0IX_WAKEUP_EVTS 20
  68. #define TELEM_PSS_LTR_BLOCKING_EVTS 20
  69. #define TELEM_IOSS_DX_D0IX_EVTS 25
  70. #define TELEM_IOSS_PG_EVTS 30
  71. #define TELEM_EVT_LEN(x) (sizeof(x)/sizeof((x)[0]))
  72. #define TELEM_DEBUGFS_CPU(model, data) \
  73. { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&data}
  74. #define TELEM_CHECK_AND_PARSE_EVTS(EVTID, EVTNUM, BUF, EVTLOG, EVTDAT, MASK) { \
  75. if (evtlog[index].telem_evtid == (EVTID)) { \
  76. for (idx = 0; idx < (EVTNUM); idx++) \
  77. (BUF)[idx] = ((EVTLOG) >> (EVTDAT)[idx].bit_pos) & \
  78. (MASK); \
  79. continue; \
  80. } \
  81. }
  82. #define TELEM_CHECK_AND_PARSE_CTRS(EVTID, CTR) { \
  83. if (evtlog[index].telem_evtid == (EVTID)) { \
  84. (CTR) = evtlog[index].telem_evtlog; \
  85. continue; \
  86. } \
  87. }
  88. static u8 suspend_prep_ok;
  89. static u32 suspend_shlw_ctr_temp, suspend_deep_ctr_temp;
  90. static u64 suspend_shlw_res_temp, suspend_deep_res_temp;
  91. struct telemetry_susp_stats {
  92. u32 shlw_swake_ctr;
  93. u32 deep_swake_ctr;
  94. u64 shlw_swake_res;
  95. u64 deep_swake_res;
  96. u32 shlw_ctr;
  97. u32 deep_ctr;
  98. u64 shlw_res;
  99. u64 deep_res;
  100. };
  101. /* Bitmap definitions for default counters in APL */
  102. struct telem_pss_idle_stateinfo {
  103. const char *name;
  104. u32 bit_pos;
  105. };
  106. static struct telem_pss_idle_stateinfo telem_apl_pss_idle_data[] = {
  107. {"IA_CORE0_C1E", 0},
  108. {"IA_CORE1_C1E", 1},
  109. {"IA_CORE2_C1E", 2},
  110. {"IA_CORE3_C1E", 3},
  111. {"IA_CORE0_C6", 16},
  112. {"IA_CORE1_C6", 17},
  113. {"IA_CORE2_C6", 18},
  114. {"IA_CORE3_C6", 19},
  115. {"IA_MODULE0_C7", 32},
  116. {"IA_MODULE1_C7", 33},
  117. {"GT_RC6", 40},
  118. {"IUNIT_PROCESSING_IDLE", 41},
  119. {"FAR_MEM_IDLE", 43},
  120. {"DISPLAY_IDLE", 44},
  121. {"IUNIT_INPUT_SYSTEM_IDLE", 45},
  122. {"PCS_STATUS", 60},
  123. };
  124. struct telem_pcs_blkd_info {
  125. const char *name;
  126. u32 bit_pos;
  127. };
  128. static struct telem_pcs_blkd_info telem_apl_pcs_idle_blkd_data[] = {
  129. {"COMPUTE", 0},
  130. {"MISC", 8},
  131. {"MODULE_ACTIONS_PENDING", 16},
  132. {"LTR", 24},
  133. {"DISPLAY_WAKE", 32},
  134. {"ISP_WAKE", 40},
  135. {"PSF0_ACTIVE", 48},
  136. };
  137. static struct telem_pcs_blkd_info telem_apl_pcs_s0ix_blkd_data[] = {
  138. {"LTR", 0},
  139. {"IRTL", 8},
  140. {"WAKE_DEADLINE_PENDING", 16},
  141. {"DISPLAY", 24},
  142. {"ISP", 32},
  143. {"CORE", 40},
  144. {"PMC", 48},
  145. {"MISC", 56},
  146. };
  147. struct telem_pss_ltr_info {
  148. const char *name;
  149. u32 bit_pos;
  150. };
  151. static struct telem_pss_ltr_info telem_apl_pss_ltr_data[] = {
  152. {"CORE_ACTIVE", 0},
  153. {"MEM_UP", 8},
  154. {"DFX", 16},
  155. {"DFX_FORCE_LTR", 24},
  156. {"DISPLAY", 32},
  157. {"ISP", 40},
  158. {"SOUTH", 48},
  159. };
  160. struct telem_pss_wakeup_info {
  161. const char *name;
  162. u32 bit_pos;
  163. };
  164. static struct telem_pss_wakeup_info telem_apl_pss_wakeup[] = {
  165. {"IP_IDLE", 0},
  166. {"DISPLAY_WAKE", 8},
  167. {"VOLTAGE_REG_INT", 16},
  168. {"DROWSY_TIMER (HOTPLUG)", 24},
  169. {"CORE_WAKE", 32},
  170. {"MISC_S0IX", 40},
  171. {"MISC_ABORT", 56},
  172. };
  173. struct telem_ioss_d0ix_stateinfo {
  174. const char *name;
  175. u32 bit_pos;
  176. };
  177. static struct telem_ioss_d0ix_stateinfo telem_apl_ioss_d0ix_data[] = {
  178. {"CSE", 0},
  179. {"SCC2", 1},
  180. {"GMM", 2},
  181. {"XDCI", 3},
  182. {"XHCI", 4},
  183. {"ISH", 5},
  184. {"AVS", 6},
  185. {"PCIE0P1", 7},
  186. {"PECI0P0", 8},
  187. {"LPSS", 9},
  188. {"SCC", 10},
  189. {"PWM", 11},
  190. {"PCIE1_P3", 12},
  191. {"PCIE1_P2", 13},
  192. {"PCIE1_P1", 14},
  193. {"PCIE1_P0", 15},
  194. {"CNV", 16},
  195. {"SATA", 17},
  196. {"PRTC", 18},
  197. };
  198. struct telem_ioss_pg_info {
  199. const char *name;
  200. u32 bit_pos;
  201. };
  202. static struct telem_ioss_pg_info telem_apl_ioss_pg_data[] = {
  203. {"LPSS", 0},
  204. {"SCC", 1},
  205. {"P2SB", 2},
  206. {"SCC2", 3},
  207. {"GMM", 4},
  208. {"PCIE0", 5},
  209. {"XDCI", 6},
  210. {"xHCI", 7},
  211. {"CSE", 8},
  212. {"SPI", 9},
  213. {"AVSPGD4", 10},
  214. {"AVSPGD3", 11},
  215. {"AVSPGD2", 12},
  216. {"AVSPGD1", 13},
  217. {"ISH", 14},
  218. {"EXI", 15},
  219. {"NPKVRC", 16},
  220. {"NPKVNN", 17},
  221. {"CUNIT", 18},
  222. {"FUSE_CTRL", 19},
  223. {"PCIE1", 20},
  224. {"CNV", 21},
  225. {"LPC", 22},
  226. {"SATA", 23},
  227. {"SMB", 24},
  228. {"PRTC", 25},
  229. };
  230. struct telemetry_debugfs_conf {
  231. struct telemetry_susp_stats suspend_stats;
  232. struct dentry *telemetry_dbg_dir;
  233. /* Bitmap Data */
  234. struct telem_ioss_d0ix_stateinfo *ioss_d0ix_data;
  235. struct telem_pss_idle_stateinfo *pss_idle_data;
  236. struct telem_pcs_blkd_info *pcs_idle_blkd_data;
  237. struct telem_pcs_blkd_info *pcs_s0ix_blkd_data;
  238. struct telem_pss_wakeup_info *pss_wakeup;
  239. struct telem_pss_ltr_info *pss_ltr_data;
  240. struct telem_ioss_pg_info *ioss_pg_data;
  241. u8 pcs_idle_blkd_evts;
  242. u8 pcs_s0ix_blkd_evts;
  243. u8 pss_wakeup_evts;
  244. u8 pss_idle_evts;
  245. u8 pss_ltr_evts;
  246. u8 ioss_d0ix_evts;
  247. u8 ioss_pg_evts;
  248. /* IDs */
  249. u16 pss_ltr_blocking_id;
  250. u16 pcs_idle_blkd_id;
  251. u16 pcs_s0ix_blkd_id;
  252. u16 s0ix_total_occ_id;
  253. u16 s0ix_shlw_occ_id;
  254. u16 s0ix_deep_occ_id;
  255. u16 s0ix_total_res_id;
  256. u16 s0ix_shlw_res_id;
  257. u16 s0ix_deep_res_id;
  258. u16 pss_wakeup_id;
  259. u16 ioss_d0ix_id;
  260. u16 pstates_id;
  261. u16 pss_idle_id;
  262. u16 ioss_d3_id;
  263. u16 ioss_pg_id;
  264. };
  265. static struct telemetry_debugfs_conf *debugfs_conf;
  266. static struct telemetry_debugfs_conf telem_apl_debugfs_conf = {
  267. .pss_idle_data = telem_apl_pss_idle_data,
  268. .pcs_idle_blkd_data = telem_apl_pcs_idle_blkd_data,
  269. .pcs_s0ix_blkd_data = telem_apl_pcs_s0ix_blkd_data,
  270. .pss_ltr_data = telem_apl_pss_ltr_data,
  271. .pss_wakeup = telem_apl_pss_wakeup,
  272. .ioss_d0ix_data = telem_apl_ioss_d0ix_data,
  273. .ioss_pg_data = telem_apl_ioss_pg_data,
  274. .pss_idle_evts = TELEM_EVT_LEN(telem_apl_pss_idle_data),
  275. .pcs_idle_blkd_evts = TELEM_EVT_LEN(telem_apl_pcs_idle_blkd_data),
  276. .pcs_s0ix_blkd_evts = TELEM_EVT_LEN(telem_apl_pcs_s0ix_blkd_data),
  277. .pss_ltr_evts = TELEM_EVT_LEN(telem_apl_pss_ltr_data),
  278. .pss_wakeup_evts = TELEM_EVT_LEN(telem_apl_pss_wakeup),
  279. .ioss_d0ix_evts = TELEM_EVT_LEN(telem_apl_ioss_d0ix_data),
  280. .ioss_pg_evts = TELEM_EVT_LEN(telem_apl_ioss_pg_data),
  281. .pstates_id = TELEM_APL_PSS_PSTATES_ID,
  282. .pss_idle_id = TELEM_APL_PSS_IDLE_ID,
  283. .pcs_idle_blkd_id = TELEM_APL_PCS_IDLE_BLOCKED_ID,
  284. .pcs_s0ix_blkd_id = TELEM_APL_PCS_S0IX_BLOCKED_ID,
  285. .pss_wakeup_id = TELEM_APL_PSS_WAKEUP_ID,
  286. .pss_ltr_blocking_id = TELEM_APL_PSS_LTR_BLOCKING_ID,
  287. .s0ix_total_occ_id = TELEM_APL_S0IX_TOTAL_OCC_ID,
  288. .s0ix_shlw_occ_id = TELEM_APL_S0IX_SHLW_OCC_ID,
  289. .s0ix_deep_occ_id = TELEM_APL_S0IX_DEEP_OCC_ID,
  290. .s0ix_total_res_id = TELEM_APL_S0IX_TOTAL_RES_ID,
  291. .s0ix_shlw_res_id = TELEM_APL_S0IX_SHLW_RES_ID,
  292. .s0ix_deep_res_id = TELEM_APL_S0IX_DEEP_RES_ID,
  293. .ioss_d0ix_id = TELEM_APL_D0IX_ID,
  294. .ioss_d3_id = TELEM_APL_D3_ID,
  295. .ioss_pg_id = TELEM_APL_PG_ID,
  296. };
  297. static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
  298. TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
  299. {}
  300. };
  301. MODULE_DEVICE_TABLE(x86cpu, telemetry_debugfs_cpu_ids);
  302. static int telemetry_debugfs_check_evts(void)
  303. {
  304. if ((debugfs_conf->pss_idle_evts > TELEM_PSS_IDLE_EVTS) ||
  305. (debugfs_conf->pcs_idle_blkd_evts > TELEM_PSS_IDLE_BLOCKED_EVTS) ||
  306. (debugfs_conf->pcs_s0ix_blkd_evts > TELEM_PSS_S0IX_BLOCKED_EVTS) ||
  307. (debugfs_conf->pss_ltr_evts > TELEM_PSS_LTR_BLOCKING_EVTS) ||
  308. (debugfs_conf->pss_wakeup_evts > TELEM_PSS_S0IX_WAKEUP_EVTS) ||
  309. (debugfs_conf->ioss_d0ix_evts > TELEM_IOSS_DX_D0IX_EVTS) ||
  310. (debugfs_conf->ioss_pg_evts > TELEM_IOSS_PG_EVTS))
  311. return -EINVAL;
  312. return 0;
  313. }
  314. static int telem_pss_states_show(struct seq_file *s, void *unused)
  315. {
  316. struct telemetry_evtlog evtlog[TELEM_MAX_OS_ALLOCATED_EVENTS];
  317. struct telemetry_debugfs_conf *conf = debugfs_conf;
  318. const char *name[TELEM_MAX_OS_ALLOCATED_EVENTS];
  319. u32 pcs_idle_blkd[TELEM_PSS_IDLE_BLOCKED_EVTS],
  320. pcs_s0ix_blkd[TELEM_PSS_S0IX_BLOCKED_EVTS],
  321. pss_s0ix_wakeup[TELEM_PSS_S0IX_WAKEUP_EVTS],
  322. pss_ltr_blkd[TELEM_PSS_LTR_BLOCKING_EVTS],
  323. pss_idle[TELEM_PSS_IDLE_EVTS];
  324. int index, idx, ret, err = 0;
  325. u64 pstates = 0;
  326. ret = telemetry_read_eventlog(TELEM_PSS, evtlog,
  327. TELEM_MAX_OS_ALLOCATED_EVENTS);
  328. if (ret < 0)
  329. return ret;
  330. err = telemetry_get_evtname(TELEM_PSS, name,
  331. TELEM_MAX_OS_ALLOCATED_EVENTS);
  332. if (err < 0)
  333. return err;
  334. seq_puts(s, "\n----------------------------------------------------\n");
  335. seq_puts(s, "\tPSS TELEM EVENTLOG (Residency = field/19.2 us\n");
  336. seq_puts(s, "----------------------------------------------------\n");
  337. for (index = 0; index < ret; index++) {
  338. seq_printf(s, "%-32s %llu\n",
  339. name[index], evtlog[index].telem_evtlog);
  340. /* Fetch PSS IDLE State */
  341. if (evtlog[index].telem_evtid == conf->pss_idle_id) {
  342. pss_idle[conf->pss_idle_evts - 1] =
  343. (evtlog[index].telem_evtlog >>
  344. conf->pss_idle_data[conf->pss_idle_evts - 1].bit_pos) &
  345. TELEM_APL_MASK_PCS_STATE;
  346. }
  347. TELEM_CHECK_AND_PARSE_EVTS(conf->pss_idle_id,
  348. conf->pss_idle_evts - 1,
  349. pss_idle, evtlog[index].telem_evtlog,
  350. conf->pss_idle_data, TELEM_MASK_BIT);
  351. TELEM_CHECK_AND_PARSE_EVTS(conf->pcs_idle_blkd_id,
  352. conf->pcs_idle_blkd_evts,
  353. pcs_idle_blkd,
  354. evtlog[index].telem_evtlog,
  355. conf->pcs_idle_blkd_data,
  356. TELEM_MASK_BYTE);
  357. TELEM_CHECK_AND_PARSE_EVTS(conf->pcs_s0ix_blkd_id,
  358. conf->pcs_s0ix_blkd_evts,
  359. pcs_s0ix_blkd,
  360. evtlog[index].telem_evtlog,
  361. conf->pcs_s0ix_blkd_data,
  362. TELEM_MASK_BYTE);
  363. TELEM_CHECK_AND_PARSE_EVTS(conf->pss_wakeup_id,
  364. conf->pss_wakeup_evts,
  365. pss_s0ix_wakeup,
  366. evtlog[index].telem_evtlog,
  367. conf->pss_wakeup, TELEM_MASK_BYTE);
  368. TELEM_CHECK_AND_PARSE_EVTS(conf->pss_ltr_blocking_id,
  369. conf->pss_ltr_evts, pss_ltr_blkd,
  370. evtlog[index].telem_evtlog,
  371. conf->pss_ltr_data, TELEM_MASK_BYTE);
  372. if (evtlog[index].telem_evtid == debugfs_conf->pstates_id)
  373. pstates = evtlog[index].telem_evtlog;
  374. }
  375. seq_puts(s, "\n--------------------------------------\n");
  376. seq_puts(s, "PStates\n");
  377. seq_puts(s, "--------------------------------------\n");
  378. seq_puts(s, "Domain\t\t\t\tFreq(Mhz)\n");
  379. seq_printf(s, " IA\t\t\t\t %llu\n GT\t\t\t\t %llu\n",
  380. (pstates & TELEM_MASK_BYTE)*100,
  381. ((pstates >> 8) & TELEM_MASK_BYTE)*50/3);
  382. seq_printf(s, " IUNIT\t\t\t\t %llu\n SA\t\t\t\t %llu\n",
  383. ((pstates >> 16) & TELEM_MASK_BYTE)*25,
  384. ((pstates >> 24) & TELEM_MASK_BYTE)*50/3);
  385. seq_puts(s, "\n--------------------------------------\n");
  386. seq_puts(s, "PSS IDLE Status\n");
  387. seq_puts(s, "--------------------------------------\n");
  388. seq_puts(s, "Device\t\t\t\t\tIDLE\n");
  389. for (index = 0; index < debugfs_conf->pss_idle_evts; index++) {
  390. seq_printf(s, "%-32s\t%u\n",
  391. debugfs_conf->pss_idle_data[index].name,
  392. pss_idle[index]);
  393. }
  394. seq_puts(s, "\n--------------------------------------\n");
  395. seq_puts(s, "PSS Idle blkd Status (~1ms saturating bucket)\n");
  396. seq_puts(s, "--------------------------------------\n");
  397. seq_puts(s, "Blocker\t\t\t\t\tCount\n");
  398. for (index = 0; index < debugfs_conf->pcs_idle_blkd_evts; index++) {
  399. seq_printf(s, "%-32s\t%u\n",
  400. debugfs_conf->pcs_idle_blkd_data[index].name,
  401. pcs_idle_blkd[index]);
  402. }
  403. seq_puts(s, "\n--------------------------------------\n");
  404. seq_puts(s, "PSS S0ix blkd Status (~1ms saturating bucket)\n");
  405. seq_puts(s, "--------------------------------------\n");
  406. seq_puts(s, "Blocker\t\t\t\t\tCount\n");
  407. for (index = 0; index < debugfs_conf->pcs_s0ix_blkd_evts; index++) {
  408. seq_printf(s, "%-32s\t%u\n",
  409. debugfs_conf->pcs_s0ix_blkd_data[index].name,
  410. pcs_s0ix_blkd[index]);
  411. }
  412. seq_puts(s, "\n--------------------------------------\n");
  413. seq_puts(s, "LTR Blocking Status (~1ms saturating bucket)\n");
  414. seq_puts(s, "--------------------------------------\n");
  415. seq_puts(s, "Blocker\t\t\t\t\tCount\n");
  416. for (index = 0; index < debugfs_conf->pss_ltr_evts; index++) {
  417. seq_printf(s, "%-32s\t%u\n",
  418. debugfs_conf->pss_ltr_data[index].name,
  419. pss_s0ix_wakeup[index]);
  420. }
  421. seq_puts(s, "\n--------------------------------------\n");
  422. seq_puts(s, "Wakes Status (~1ms saturating bucket)\n");
  423. seq_puts(s, "--------------------------------------\n");
  424. seq_puts(s, "Wakes\t\t\t\t\tCount\n");
  425. for (index = 0; index < debugfs_conf->pss_wakeup_evts; index++) {
  426. seq_printf(s, "%-32s\t%u\n",
  427. debugfs_conf->pss_wakeup[index].name,
  428. pss_ltr_blkd[index]);
  429. }
  430. return 0;
  431. }
  432. static int telem_pss_state_open(struct inode *inode, struct file *file)
  433. {
  434. return single_open(file, telem_pss_states_show, inode->i_private);
  435. }
  436. static const struct file_operations telem_pss_ops = {
  437. .open = telem_pss_state_open,
  438. .read = seq_read,
  439. .llseek = seq_lseek,
  440. .release = single_release,
  441. };
  442. static int telem_ioss_states_show(struct seq_file *s, void *unused)
  443. {
  444. struct telemetry_evtlog evtlog[TELEM_MAX_OS_ALLOCATED_EVENTS];
  445. const char *name[TELEM_MAX_OS_ALLOCATED_EVENTS];
  446. int index, ret, err;
  447. ret = telemetry_read_eventlog(TELEM_IOSS, evtlog,
  448. TELEM_MAX_OS_ALLOCATED_EVENTS);
  449. if (ret < 0)
  450. return ret;
  451. err = telemetry_get_evtname(TELEM_IOSS, name,
  452. TELEM_MAX_OS_ALLOCATED_EVENTS);
  453. if (err < 0)
  454. return err;
  455. seq_puts(s, "--------------------------------------\n");
  456. seq_puts(s, "\tI0SS TELEMETRY EVENTLOG\n");
  457. seq_puts(s, "--------------------------------------\n");
  458. for (index = 0; index < ret; index++) {
  459. seq_printf(s, "%-32s 0x%llx\n",
  460. name[index], evtlog[index].telem_evtlog);
  461. }
  462. return 0;
  463. }
  464. static int telem_ioss_state_open(struct inode *inode, struct file *file)
  465. {
  466. return single_open(file, telem_ioss_states_show, inode->i_private);
  467. }
  468. static const struct file_operations telem_ioss_ops = {
  469. .open = telem_ioss_state_open,
  470. .read = seq_read,
  471. .llseek = seq_lseek,
  472. .release = single_release,
  473. };
  474. static int telem_soc_states_show(struct seq_file *s, void *unused)
  475. {
  476. u32 d3_sts[TELEM_IOSS_DX_D0IX_EVTS], d0ix_sts[TELEM_IOSS_DX_D0IX_EVTS];
  477. u32 pg_sts[TELEM_IOSS_PG_EVTS], pss_idle[TELEM_PSS_IDLE_EVTS];
  478. struct telemetry_evtlog evtlog[TELEM_MAX_OS_ALLOCATED_EVENTS];
  479. u32 s0ix_total_ctr = 0, s0ix_shlw_ctr = 0, s0ix_deep_ctr = 0;
  480. u64 s0ix_total_res = 0, s0ix_shlw_res = 0, s0ix_deep_res = 0;
  481. struct telemetry_debugfs_conf *conf = debugfs_conf;
  482. struct pci_dev *dev = NULL;
  483. int index, idx, ret;
  484. u32 d3_state;
  485. u16 pmcsr;
  486. ret = telemetry_read_eventlog(TELEM_IOSS, evtlog,
  487. TELEM_MAX_OS_ALLOCATED_EVENTS);
  488. if (ret < 0)
  489. return ret;
  490. for (index = 0; index < ret; index++) {
  491. TELEM_CHECK_AND_PARSE_EVTS(conf->ioss_d3_id,
  492. conf->ioss_d0ix_evts,
  493. d3_sts, evtlog[index].telem_evtlog,
  494. conf->ioss_d0ix_data,
  495. TELEM_MASK_BIT);
  496. TELEM_CHECK_AND_PARSE_EVTS(conf->ioss_pg_id, conf->ioss_pg_evts,
  497. pg_sts, evtlog[index].telem_evtlog,
  498. conf->ioss_pg_data, TELEM_MASK_BIT);
  499. TELEM_CHECK_AND_PARSE_EVTS(conf->ioss_d0ix_id,
  500. conf->ioss_d0ix_evts,
  501. d0ix_sts, evtlog[index].telem_evtlog,
  502. conf->ioss_d0ix_data,
  503. TELEM_MASK_BIT);
  504. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_total_occ_id,
  505. s0ix_total_ctr);
  506. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_occ_id,
  507. s0ix_shlw_ctr);
  508. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_occ_id,
  509. s0ix_deep_ctr);
  510. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_total_res_id,
  511. s0ix_total_res);
  512. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_res_id,
  513. s0ix_shlw_res);
  514. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_res_id,
  515. s0ix_deep_res);
  516. }
  517. seq_puts(s, "\n---------------------------------------------------\n");
  518. seq_puts(s, "S0IX Type\t\t\t Occurrence\t\t Residency(us)\n");
  519. seq_puts(s, "---------------------------------------------------\n");
  520. seq_printf(s, "S0IX Shallow\t\t\t %10u\t %10llu\n",
  521. s0ix_shlw_ctr -
  522. conf->suspend_stats.shlw_ctr -
  523. conf->suspend_stats.shlw_swake_ctr,
  524. (u64)((s0ix_shlw_res -
  525. conf->suspend_stats.shlw_res -
  526. conf->suspend_stats.shlw_swake_res)*10/192));
  527. seq_printf(s, "S0IX Deep\t\t\t %10u\t %10llu\n",
  528. s0ix_deep_ctr -
  529. conf->suspend_stats.deep_ctr -
  530. conf->suspend_stats.deep_swake_ctr,
  531. (u64)((s0ix_deep_res -
  532. conf->suspend_stats.deep_res -
  533. conf->suspend_stats.deep_swake_res)*10/192));
  534. seq_printf(s, "Suspend(With S0ixShallow)\t %10u\t %10llu\n",
  535. conf->suspend_stats.shlw_ctr,
  536. (u64)(conf->suspend_stats.shlw_res*10)/192);
  537. seq_printf(s, "Suspend(With S0ixDeep)\t\t %10u\t %10llu\n",
  538. conf->suspend_stats.deep_ctr,
  539. (u64)(conf->suspend_stats.deep_res*10)/192);
  540. seq_printf(s, "Suspend(With Shallow-Wakes)\t %10u\t %10llu\n",
  541. conf->suspend_stats.shlw_swake_ctr +
  542. conf->suspend_stats.deep_swake_ctr,
  543. (u64)((conf->suspend_stats.shlw_swake_res +
  544. conf->suspend_stats.deep_swake_res)*10/192));
  545. seq_printf(s, "S0IX+Suspend Total\t\t %10u\t %10llu\n", s0ix_total_ctr,
  546. (u64)(s0ix_total_res*10/192));
  547. seq_puts(s, "\n-------------------------------------------------\n");
  548. seq_puts(s, "\t\tDEVICE STATES\n");
  549. seq_puts(s, "-------------------------------------------------\n");
  550. for_each_pci_dev(dev) {
  551. pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
  552. d3_state = ((pmcsr & PCI_PM_CTRL_STATE_MASK) ==
  553. (__force int)PCI_D3hot) ? 1 : 0;
  554. seq_printf(s, "pci %04x %04X %s %20.20s: ",
  555. dev->vendor, dev->device, dev_name(&dev->dev),
  556. dev_driver_string(&dev->dev));
  557. seq_printf(s, " d3:%x\n", d3_state);
  558. }
  559. seq_puts(s, "\n--------------------------------------\n");
  560. seq_puts(s, "D3/D0i3 Status\n");
  561. seq_puts(s, "--------------------------------------\n");
  562. seq_puts(s, "Block\t\t D3\t D0i3\n");
  563. for (index = 0; index < conf->ioss_d0ix_evts; index++) {
  564. seq_printf(s, "%-10s\t %u\t %u\n",
  565. conf->ioss_d0ix_data[index].name,
  566. d3_sts[index], d0ix_sts[index]);
  567. }
  568. seq_puts(s, "\n--------------------------------------\n");
  569. seq_puts(s, "South Complex PowerGate Status\n");
  570. seq_puts(s, "--------------------------------------\n");
  571. seq_puts(s, "Device\t\t PG\n");
  572. for (index = 0; index < conf->ioss_pg_evts; index++) {
  573. seq_printf(s, "%-10s\t %u\n",
  574. conf->ioss_pg_data[index].name,
  575. pg_sts[index]);
  576. }
  577. evtlog->telem_evtid = conf->pss_idle_id;
  578. ret = telemetry_read_events(TELEM_PSS, evtlog, 1);
  579. if (ret < 0)
  580. return ret;
  581. seq_puts(s, "\n-----------------------------------------\n");
  582. seq_puts(s, "North Idle Status\n");
  583. seq_puts(s, "-----------------------------------------\n");
  584. for (idx = 0; idx < conf->pss_idle_evts - 1; idx++) {
  585. pss_idle[idx] = (evtlog->telem_evtlog >>
  586. conf->pss_idle_data[idx].bit_pos) &
  587. TELEM_MASK_BIT;
  588. }
  589. pss_idle[idx] = (evtlog->telem_evtlog >>
  590. conf->pss_idle_data[idx].bit_pos) &
  591. TELEM_APL_MASK_PCS_STATE;
  592. for (index = 0; index < conf->pss_idle_evts; index++) {
  593. seq_printf(s, "%-30s %u\n",
  594. conf->pss_idle_data[index].name,
  595. pss_idle[index]);
  596. }
  597. seq_puts(s, "\nPCS_STATUS Code\n");
  598. seq_puts(s, "0:C0 1:C1 2:C1_DN_WT_DEV 3:C2 4:C2_WT_DE_MEM_UP\n");
  599. seq_puts(s, "5:C2_WT_DE_MEM_DOWN 6:C2_UP_WT_DEV 7:C2_DN 8:C2_VOA\n");
  600. seq_puts(s, "9:C2_VOA_UP 10:S0IX_PRE 11:S0IX\n");
  601. return 0;
  602. }
  603. static int telem_soc_state_open(struct inode *inode, struct file *file)
  604. {
  605. return single_open(file, telem_soc_states_show, inode->i_private);
  606. }
  607. static const struct file_operations telem_socstate_ops = {
  608. .open = telem_soc_state_open,
  609. .read = seq_read,
  610. .llseek = seq_lseek,
  611. .release = single_release,
  612. };
  613. static int telem_s0ix_res_get(void *data, u64 *val)
  614. {
  615. u64 s0ix_total_res;
  616. int ret;
  617. ret = intel_pmc_s0ix_counter_read(&s0ix_total_res);
  618. if (ret) {
  619. pr_err("Failed to read S0ix residency");
  620. return ret;
  621. }
  622. *val = s0ix_total_res;
  623. return 0;
  624. }
  625. DEFINE_DEBUGFS_ATTRIBUTE(telem_s0ix_fops, telem_s0ix_res_get, NULL, "%llu\n");
  626. static int telem_pss_trc_verb_show(struct seq_file *s, void *unused)
  627. {
  628. u32 verbosity;
  629. int err;
  630. err = telemetry_get_trace_verbosity(TELEM_PSS, &verbosity);
  631. if (err) {
  632. pr_err("Get PSS Trace Verbosity Failed with Error %d\n", err);
  633. return -EFAULT;
  634. }
  635. seq_printf(s, "PSS Trace Verbosity %u\n", verbosity);
  636. return 0;
  637. }
  638. static ssize_t telem_pss_trc_verb_write(struct file *file,
  639. const char __user *userbuf,
  640. size_t count, loff_t *ppos)
  641. {
  642. u32 verbosity;
  643. int err;
  644. if (kstrtou32_from_user(userbuf, count, 0, &verbosity))
  645. return -EFAULT;
  646. err = telemetry_set_trace_verbosity(TELEM_PSS, verbosity);
  647. if (err) {
  648. pr_err("Changing PSS Trace Verbosity Failed. Error %d\n", err);
  649. count = err;
  650. }
  651. return count;
  652. }
  653. static int telem_pss_trc_verb_open(struct inode *inode, struct file *file)
  654. {
  655. return single_open(file, telem_pss_trc_verb_show, inode->i_private);
  656. }
  657. static const struct file_operations telem_pss_trc_verb_ops = {
  658. .open = telem_pss_trc_verb_open,
  659. .read = seq_read,
  660. .write = telem_pss_trc_verb_write,
  661. .llseek = seq_lseek,
  662. .release = single_release,
  663. };
  664. static int telem_ioss_trc_verb_show(struct seq_file *s, void *unused)
  665. {
  666. u32 verbosity;
  667. int err;
  668. err = telemetry_get_trace_verbosity(TELEM_IOSS, &verbosity);
  669. if (err) {
  670. pr_err("Get IOSS Trace Verbosity Failed with Error %d\n", err);
  671. return -EFAULT;
  672. }
  673. seq_printf(s, "IOSS Trace Verbosity %u\n", verbosity);
  674. return 0;
  675. }
  676. static ssize_t telem_ioss_trc_verb_write(struct file *file,
  677. const char __user *userbuf,
  678. size_t count, loff_t *ppos)
  679. {
  680. u32 verbosity;
  681. int err;
  682. if (kstrtou32_from_user(userbuf, count, 0, &verbosity))
  683. return -EFAULT;
  684. err = telemetry_set_trace_verbosity(TELEM_IOSS, verbosity);
  685. if (err) {
  686. pr_err("Changing IOSS Trace Verbosity Failed. Error %d\n", err);
  687. count = err;
  688. }
  689. return count;
  690. }
  691. static int telem_ioss_trc_verb_open(struct inode *inode, struct file *file)
  692. {
  693. return single_open(file, telem_ioss_trc_verb_show, inode->i_private);
  694. }
  695. static const struct file_operations telem_ioss_trc_verb_ops = {
  696. .open = telem_ioss_trc_verb_open,
  697. .read = seq_read,
  698. .write = telem_ioss_trc_verb_write,
  699. .llseek = seq_lseek,
  700. .release = single_release,
  701. };
  702. static int pm_suspend_prep_cb(void)
  703. {
  704. struct telemetry_evtlog evtlog[TELEM_MAX_OS_ALLOCATED_EVENTS];
  705. struct telemetry_debugfs_conf *conf = debugfs_conf;
  706. int ret, index;
  707. ret = telemetry_raw_read_eventlog(TELEM_IOSS, evtlog,
  708. TELEM_MAX_OS_ALLOCATED_EVENTS);
  709. if (ret < 0) {
  710. suspend_prep_ok = 0;
  711. goto out;
  712. }
  713. for (index = 0; index < ret; index++) {
  714. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_occ_id,
  715. suspend_shlw_ctr_temp);
  716. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_occ_id,
  717. suspend_deep_ctr_temp);
  718. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_res_id,
  719. suspend_shlw_res_temp);
  720. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_res_id,
  721. suspend_deep_res_temp);
  722. }
  723. suspend_prep_ok = 1;
  724. out:
  725. return NOTIFY_OK;
  726. }
  727. static int pm_suspend_exit_cb(void)
  728. {
  729. struct telemetry_evtlog evtlog[TELEM_MAX_OS_ALLOCATED_EVENTS];
  730. static u32 suspend_shlw_ctr_exit, suspend_deep_ctr_exit;
  731. static u64 suspend_shlw_res_exit, suspend_deep_res_exit;
  732. struct telemetry_debugfs_conf *conf = debugfs_conf;
  733. int ret, index;
  734. if (!suspend_prep_ok)
  735. goto out;
  736. ret = telemetry_raw_read_eventlog(TELEM_IOSS, evtlog,
  737. TELEM_MAX_OS_ALLOCATED_EVENTS);
  738. if (ret < 0)
  739. goto out;
  740. for (index = 0; index < ret; index++) {
  741. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_occ_id,
  742. suspend_shlw_ctr_exit);
  743. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_occ_id,
  744. suspend_deep_ctr_exit);
  745. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_shlw_res_id,
  746. suspend_shlw_res_exit);
  747. TELEM_CHECK_AND_PARSE_CTRS(conf->s0ix_deep_res_id,
  748. suspend_deep_res_exit);
  749. }
  750. if ((suspend_shlw_ctr_exit < suspend_shlw_ctr_temp) ||
  751. (suspend_deep_ctr_exit < suspend_deep_ctr_temp) ||
  752. (suspend_shlw_res_exit < suspend_shlw_res_temp) ||
  753. (suspend_deep_res_exit < suspend_deep_res_temp)) {
  754. pr_err("Wrong s0ix counters detected\n");
  755. goto out;
  756. }
  757. suspend_shlw_ctr_exit -= suspend_shlw_ctr_temp;
  758. suspend_deep_ctr_exit -= suspend_deep_ctr_temp;
  759. suspend_shlw_res_exit -= suspend_shlw_res_temp;
  760. suspend_deep_res_exit -= suspend_deep_res_temp;
  761. if (suspend_shlw_ctr_exit == 1) {
  762. conf->suspend_stats.shlw_ctr +=
  763. suspend_shlw_ctr_exit;
  764. conf->suspend_stats.shlw_res +=
  765. suspend_shlw_res_exit;
  766. }
  767. /* Shallow Wakes Case */
  768. else if (suspend_shlw_ctr_exit > 1) {
  769. conf->suspend_stats.shlw_swake_ctr +=
  770. suspend_shlw_ctr_exit;
  771. conf->suspend_stats.shlw_swake_res +=
  772. suspend_shlw_res_exit;
  773. }
  774. if (suspend_deep_ctr_exit == 1) {
  775. conf->suspend_stats.deep_ctr +=
  776. suspend_deep_ctr_exit;
  777. conf->suspend_stats.deep_res +=
  778. suspend_deep_res_exit;
  779. }
  780. /* Shallow Wakes Case */
  781. else if (suspend_deep_ctr_exit > 1) {
  782. conf->suspend_stats.deep_swake_ctr +=
  783. suspend_deep_ctr_exit;
  784. conf->suspend_stats.deep_swake_res +=
  785. suspend_deep_res_exit;
  786. }
  787. out:
  788. suspend_prep_ok = 0;
  789. return NOTIFY_OK;
  790. }
  791. static int pm_notification(struct notifier_block *this,
  792. unsigned long event, void *ptr)
  793. {
  794. switch (event) {
  795. case PM_SUSPEND_PREPARE:
  796. return pm_suspend_prep_cb();
  797. case PM_POST_SUSPEND:
  798. return pm_suspend_exit_cb();
  799. }
  800. return NOTIFY_DONE;
  801. }
  802. static struct notifier_block pm_notifier = {
  803. .notifier_call = pm_notification,
  804. };
  805. static int __init telemetry_debugfs_init(void)
  806. {
  807. const struct x86_cpu_id *id;
  808. int err;
  809. struct dentry *f;
  810. /* Only APL supported for now */
  811. id = x86_match_cpu(telemetry_debugfs_cpu_ids);
  812. if (!id)
  813. return -ENODEV;
  814. debugfs_conf = (struct telemetry_debugfs_conf *)id->driver_data;
  815. err = telemetry_pltconfig_valid();
  816. if (err < 0)
  817. return -ENODEV;
  818. err = telemetry_debugfs_check_evts();
  819. if (err < 0)
  820. return -EINVAL;
  821. register_pm_notifier(&pm_notifier);
  822. err = -ENOMEM;
  823. debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
  824. if (!debugfs_conf->telemetry_dbg_dir)
  825. goto out_pm;
  826. f = debugfs_create_file("pss_info", S_IFREG | S_IRUGO,
  827. debugfs_conf->telemetry_dbg_dir, NULL,
  828. &telem_pss_ops);
  829. if (!f) {
  830. pr_err("pss_sample_info debugfs register failed\n");
  831. goto out;
  832. }
  833. f = debugfs_create_file("ioss_info", S_IFREG | S_IRUGO,
  834. debugfs_conf->telemetry_dbg_dir, NULL,
  835. &telem_ioss_ops);
  836. if (!f) {
  837. pr_err("ioss_sample_info debugfs register failed\n");
  838. goto out;
  839. }
  840. f = debugfs_create_file("soc_states", S_IFREG | S_IRUGO,
  841. debugfs_conf->telemetry_dbg_dir,
  842. NULL, &telem_socstate_ops);
  843. if (!f) {
  844. pr_err("ioss_sample_info debugfs register failed\n");
  845. goto out;
  846. }
  847. f = debugfs_create_file("s0ix_residency_usec", S_IFREG | S_IRUGO,
  848. debugfs_conf->telemetry_dbg_dir,
  849. NULL, &telem_s0ix_fops);
  850. if (!f) {
  851. pr_err("s0ix_residency_usec debugfs register failed\n");
  852. goto out;
  853. }
  854. f = debugfs_create_file("pss_trace_verbosity", S_IFREG | S_IRUGO,
  855. debugfs_conf->telemetry_dbg_dir, NULL,
  856. &telem_pss_trc_verb_ops);
  857. if (!f) {
  858. pr_err("pss_trace_verbosity debugfs register failed\n");
  859. goto out;
  860. }
  861. f = debugfs_create_file("ioss_trace_verbosity", S_IFREG | S_IRUGO,
  862. debugfs_conf->telemetry_dbg_dir, NULL,
  863. &telem_ioss_trc_verb_ops);
  864. if (!f) {
  865. pr_err("ioss_trace_verbosity debugfs register failed\n");
  866. goto out;
  867. }
  868. return 0;
  869. out:
  870. debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir);
  871. debugfs_conf->telemetry_dbg_dir = NULL;
  872. out_pm:
  873. unregister_pm_notifier(&pm_notifier);
  874. return err;
  875. }
  876. static void __exit telemetry_debugfs_exit(void)
  877. {
  878. debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir);
  879. debugfs_conf->telemetry_dbg_dir = NULL;
  880. unregister_pm_notifier(&pm_notifier);
  881. }
  882. late_initcall(telemetry_debugfs_init);
  883. module_exit(telemetry_debugfs_exit);
  884. MODULE_AUTHOR("Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>");
  885. MODULE_DESCRIPTION("Intel SoC Telemetry debugfs Interface");
  886. MODULE_VERSION(DRIVER_VERSION);
  887. MODULE_LICENSE("GPL");