intel_telemetry_debugfs.c 29 KB

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