sysinfo.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright IBM Corp. 2001, 2009
  4. * Author(s): Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
  5. * Martin Schwidefsky <schwidefsky@de.ibm.com>,
  6. */
  7. #include <linux/debugfs.h>
  8. #include <linux/kernel.h>
  9. #include <linux/mm.h>
  10. #include <linux/proc_fs.h>
  11. #include <linux/seq_file.h>
  12. #include <linux/init.h>
  13. #include <linux/delay.h>
  14. #include <linux/export.h>
  15. #include <linux/slab.h>
  16. #include <asm/ebcdic.h>
  17. #include <asm/debug.h>
  18. #include <asm/sysinfo.h>
  19. #include <asm/cpcmd.h>
  20. #include <asm/topology.h>
  21. #include <asm/fpu/api.h>
  22. int topology_max_mnest;
  23. static inline int __stsi(void *sysinfo, int fc, int sel1, int sel2, int *lvl)
  24. {
  25. register int r0 asm("0") = (fc << 28) | sel1;
  26. register int r1 asm("1") = sel2;
  27. int rc = 0;
  28. asm volatile(
  29. " stsi 0(%3)\n"
  30. "0: jz 2f\n"
  31. "1: lhi %1,%4\n"
  32. "2:\n"
  33. EX_TABLE(0b, 1b)
  34. : "+d" (r0), "+d" (rc)
  35. : "d" (r1), "a" (sysinfo), "K" (-EOPNOTSUPP)
  36. : "cc", "memory");
  37. *lvl = ((unsigned int) r0) >> 28;
  38. return rc;
  39. }
  40. /*
  41. * stsi - store system information
  42. *
  43. * Returns the current configuration level if function code 0 was specified.
  44. * Otherwise returns 0 on success or a negative value on error.
  45. */
  46. int stsi(void *sysinfo, int fc, int sel1, int sel2)
  47. {
  48. int lvl, rc;
  49. rc = __stsi(sysinfo, fc, sel1, sel2, &lvl);
  50. if (rc)
  51. return rc;
  52. return fc ? 0 : lvl;
  53. }
  54. EXPORT_SYMBOL(stsi);
  55. #ifdef CONFIG_PROC_FS
  56. static bool convert_ext_name(unsigned char encoding, char *name, size_t len)
  57. {
  58. switch (encoding) {
  59. case 1: /* EBCDIC */
  60. EBCASC(name, len);
  61. break;
  62. case 2: /* UTF-8 */
  63. break;
  64. default:
  65. return false;
  66. }
  67. return true;
  68. }
  69. static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info)
  70. {
  71. int i;
  72. if (stsi(info, 1, 1, 1))
  73. return;
  74. EBCASC(info->manufacturer, sizeof(info->manufacturer));
  75. EBCASC(info->type, sizeof(info->type));
  76. EBCASC(info->model, sizeof(info->model));
  77. EBCASC(info->sequence, sizeof(info->sequence));
  78. EBCASC(info->plant, sizeof(info->plant));
  79. EBCASC(info->model_capacity, sizeof(info->model_capacity));
  80. EBCASC(info->model_perm_cap, sizeof(info->model_perm_cap));
  81. EBCASC(info->model_temp_cap, sizeof(info->model_temp_cap));
  82. seq_printf(m, "Manufacturer: %-16.16s\n", info->manufacturer);
  83. seq_printf(m, "Type: %-4.4s\n", info->type);
  84. if (info->lic)
  85. seq_printf(m, "LIC Identifier: %016lx\n", info->lic);
  86. /*
  87. * Sigh: the model field has been renamed with System z9
  88. * to model_capacity and a new model field has been added
  89. * after the plant field. To avoid confusing older programs
  90. * the "Model:" prints "model_capacity model" or just
  91. * "model_capacity" if the model string is empty .
  92. */
  93. seq_printf(m, "Model: %-16.16s", info->model_capacity);
  94. if (info->model[0] != '\0')
  95. seq_printf(m, " %-16.16s", info->model);
  96. seq_putc(m, '\n');
  97. seq_printf(m, "Sequence Code: %-16.16s\n", info->sequence);
  98. seq_printf(m, "Plant: %-4.4s\n", info->plant);
  99. seq_printf(m, "Model Capacity: %-16.16s %08u\n",
  100. info->model_capacity, info->model_cap_rating);
  101. if (info->model_perm_cap_rating)
  102. seq_printf(m, "Model Perm. Capacity: %-16.16s %08u\n",
  103. info->model_perm_cap,
  104. info->model_perm_cap_rating);
  105. if (info->model_temp_cap_rating)
  106. seq_printf(m, "Model Temp. Capacity: %-16.16s %08u\n",
  107. info->model_temp_cap,
  108. info->model_temp_cap_rating);
  109. if (info->ncr)
  110. seq_printf(m, "Nominal Cap. Rating: %08u\n", info->ncr);
  111. if (info->npr)
  112. seq_printf(m, "Nominal Perm. Rating: %08u\n", info->npr);
  113. if (info->ntr)
  114. seq_printf(m, "Nominal Temp. Rating: %08u\n", info->ntr);
  115. if (info->cai) {
  116. seq_printf(m, "Capacity Adj. Ind.: %d\n", info->cai);
  117. seq_printf(m, "Capacity Ch. Reason: %d\n", info->ccr);
  118. seq_printf(m, "Capacity Transient: %d\n", info->t);
  119. }
  120. if (info->p) {
  121. for (i = 1; i <= ARRAY_SIZE(info->typepct); i++) {
  122. seq_printf(m, "Type %d Percentage: %d\n",
  123. i, info->typepct[i - 1]);
  124. }
  125. }
  126. }
  127. static void stsi_15_1_x(struct seq_file *m, struct sysinfo_15_1_x *info)
  128. {
  129. int i;
  130. seq_putc(m, '\n');
  131. if (!MACHINE_HAS_TOPOLOGY)
  132. return;
  133. if (stsi(info, 15, 1, topology_max_mnest))
  134. return;
  135. seq_printf(m, "CPU Topology HW: ");
  136. for (i = 0; i < TOPOLOGY_NR_MAG; i++)
  137. seq_printf(m, " %d", info->mag[i]);
  138. seq_putc(m, '\n');
  139. #ifdef CONFIG_SCHED_TOPOLOGY
  140. store_topology(info);
  141. seq_printf(m, "CPU Topology SW: ");
  142. for (i = 0; i < TOPOLOGY_NR_MAG; i++)
  143. seq_printf(m, " %d", info->mag[i]);
  144. seq_putc(m, '\n');
  145. #endif
  146. }
  147. static void stsi_1_2_2(struct seq_file *m, struct sysinfo_1_2_2 *info)
  148. {
  149. struct sysinfo_1_2_2_extension *ext;
  150. int i;
  151. if (stsi(info, 1, 2, 2))
  152. return;
  153. ext = (struct sysinfo_1_2_2_extension *)
  154. ((unsigned long) info + info->acc_offset);
  155. seq_printf(m, "CPUs Total: %d\n", info->cpus_total);
  156. seq_printf(m, "CPUs Configured: %d\n", info->cpus_configured);
  157. seq_printf(m, "CPUs Standby: %d\n", info->cpus_standby);
  158. seq_printf(m, "CPUs Reserved: %d\n", info->cpus_reserved);
  159. if (info->mt_installed) {
  160. seq_printf(m, "CPUs G-MTID: %d\n", info->mt_gtid);
  161. seq_printf(m, "CPUs S-MTID: %d\n", info->mt_stid);
  162. }
  163. /*
  164. * Sigh 2. According to the specification the alternate
  165. * capability field is a 32 bit floating point number
  166. * if the higher order 8 bits are not zero. Printing
  167. * a floating point number in the kernel is a no-no,
  168. * always print the number as 32 bit unsigned integer.
  169. * The user-space needs to know about the strange
  170. * encoding of the alternate cpu capability.
  171. */
  172. seq_printf(m, "Capability: %u", info->capability);
  173. if (info->format == 1)
  174. seq_printf(m, " %u", ext->alt_capability);
  175. seq_putc(m, '\n');
  176. if (info->nominal_cap)
  177. seq_printf(m, "Nominal Capability: %d\n", info->nominal_cap);
  178. if (info->secondary_cap)
  179. seq_printf(m, "Secondary Capability: %d\n", info->secondary_cap);
  180. for (i = 2; i <= info->cpus_total; i++) {
  181. seq_printf(m, "Adjustment %02d-way: %u",
  182. i, info->adjustment[i-2]);
  183. if (info->format == 1)
  184. seq_printf(m, " %u", ext->alt_adjustment[i-2]);
  185. seq_putc(m, '\n');
  186. }
  187. }
  188. static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info)
  189. {
  190. if (stsi(info, 2, 2, 2))
  191. return;
  192. EBCASC(info->name, sizeof(info->name));
  193. seq_putc(m, '\n');
  194. seq_printf(m, "LPAR Number: %d\n", info->lpar_number);
  195. seq_printf(m, "LPAR Characteristics: ");
  196. if (info->characteristics & LPAR_CHAR_DEDICATED)
  197. seq_printf(m, "Dedicated ");
  198. if (info->characteristics & LPAR_CHAR_SHARED)
  199. seq_printf(m, "Shared ");
  200. if (info->characteristics & LPAR_CHAR_LIMITED)
  201. seq_printf(m, "Limited ");
  202. seq_putc(m, '\n');
  203. seq_printf(m, "LPAR Name: %-8.8s\n", info->name);
  204. seq_printf(m, "LPAR Adjustment: %d\n", info->caf);
  205. seq_printf(m, "LPAR CPUs Total: %d\n", info->cpus_total);
  206. seq_printf(m, "LPAR CPUs Configured: %d\n", info->cpus_configured);
  207. seq_printf(m, "LPAR CPUs Standby: %d\n", info->cpus_standby);
  208. seq_printf(m, "LPAR CPUs Reserved: %d\n", info->cpus_reserved);
  209. seq_printf(m, "LPAR CPUs Dedicated: %d\n", info->cpus_dedicated);
  210. seq_printf(m, "LPAR CPUs Shared: %d\n", info->cpus_shared);
  211. if (info->mt_installed) {
  212. seq_printf(m, "LPAR CPUs G-MTID: %d\n", info->mt_gtid);
  213. seq_printf(m, "LPAR CPUs S-MTID: %d\n", info->mt_stid);
  214. seq_printf(m, "LPAR CPUs PS-MTID: %d\n", info->mt_psmtid);
  215. }
  216. if (convert_ext_name(info->vsne, info->ext_name, sizeof(info->ext_name))) {
  217. seq_printf(m, "LPAR Extended Name: %-.256s\n", info->ext_name);
  218. seq_printf(m, "LPAR UUID: %pUb\n", &info->uuid);
  219. }
  220. }
  221. static void print_ext_name(struct seq_file *m, int lvl,
  222. struct sysinfo_3_2_2 *info)
  223. {
  224. size_t len = sizeof(info->ext_names[lvl]);
  225. if (!convert_ext_name(info->vm[lvl].evmne, info->ext_names[lvl], len))
  226. return;
  227. seq_printf(m, "VM%02d Extended Name: %-.256s\n", lvl,
  228. info->ext_names[lvl]);
  229. }
  230. static void print_uuid(struct seq_file *m, int i, struct sysinfo_3_2_2 *info)
  231. {
  232. if (uuid_is_null(&info->vm[i].uuid))
  233. return;
  234. seq_printf(m, "VM%02d UUID: %pUb\n", i, &info->vm[i].uuid);
  235. }
  236. static void stsi_3_2_2(struct seq_file *m, struct sysinfo_3_2_2 *info)
  237. {
  238. int i;
  239. if (stsi(info, 3, 2, 2))
  240. return;
  241. for (i = 0; i < info->count; i++) {
  242. EBCASC(info->vm[i].name, sizeof(info->vm[i].name));
  243. EBCASC(info->vm[i].cpi, sizeof(info->vm[i].cpi));
  244. seq_putc(m, '\n');
  245. seq_printf(m, "VM%02d Name: %-8.8s\n", i, info->vm[i].name);
  246. seq_printf(m, "VM%02d Control Program: %-16.16s\n", i, info->vm[i].cpi);
  247. seq_printf(m, "VM%02d Adjustment: %d\n", i, info->vm[i].caf);
  248. seq_printf(m, "VM%02d CPUs Total: %d\n", i, info->vm[i].cpus_total);
  249. seq_printf(m, "VM%02d CPUs Configured: %d\n", i, info->vm[i].cpus_configured);
  250. seq_printf(m, "VM%02d CPUs Standby: %d\n", i, info->vm[i].cpus_standby);
  251. seq_printf(m, "VM%02d CPUs Reserved: %d\n", i, info->vm[i].cpus_reserved);
  252. print_ext_name(m, i, info);
  253. print_uuid(m, i, info);
  254. }
  255. }
  256. static int sysinfo_show(struct seq_file *m, void *v)
  257. {
  258. void *info = (void *)get_zeroed_page(GFP_KERNEL);
  259. int level;
  260. if (!info)
  261. return 0;
  262. level = stsi(NULL, 0, 0, 0);
  263. if (level >= 1)
  264. stsi_1_1_1(m, info);
  265. if (level >= 1)
  266. stsi_15_1_x(m, info);
  267. if (level >= 1)
  268. stsi_1_2_2(m, info);
  269. if (level >= 2)
  270. stsi_2_2_2(m, info);
  271. if (level >= 3)
  272. stsi_3_2_2(m, info);
  273. free_page((unsigned long)info);
  274. return 0;
  275. }
  276. static int __init sysinfo_create_proc(void)
  277. {
  278. proc_create_single("sysinfo", 0444, NULL, sysinfo_show);
  279. return 0;
  280. }
  281. device_initcall(sysinfo_create_proc);
  282. #endif /* CONFIG_PROC_FS */
  283. /*
  284. * Service levels interface.
  285. */
  286. static DECLARE_RWSEM(service_level_sem);
  287. static LIST_HEAD(service_level_list);
  288. int register_service_level(struct service_level *slr)
  289. {
  290. struct service_level *ptr;
  291. down_write(&service_level_sem);
  292. list_for_each_entry(ptr, &service_level_list, list)
  293. if (ptr == slr) {
  294. up_write(&service_level_sem);
  295. return -EEXIST;
  296. }
  297. list_add_tail(&slr->list, &service_level_list);
  298. up_write(&service_level_sem);
  299. return 0;
  300. }
  301. EXPORT_SYMBOL(register_service_level);
  302. int unregister_service_level(struct service_level *slr)
  303. {
  304. struct service_level *ptr, *next;
  305. int rc = -ENOENT;
  306. down_write(&service_level_sem);
  307. list_for_each_entry_safe(ptr, next, &service_level_list, list) {
  308. if (ptr != slr)
  309. continue;
  310. list_del(&ptr->list);
  311. rc = 0;
  312. break;
  313. }
  314. up_write(&service_level_sem);
  315. return rc;
  316. }
  317. EXPORT_SYMBOL(unregister_service_level);
  318. static void *service_level_start(struct seq_file *m, loff_t *pos)
  319. {
  320. down_read(&service_level_sem);
  321. return seq_list_start(&service_level_list, *pos);
  322. }
  323. static void *service_level_next(struct seq_file *m, void *p, loff_t *pos)
  324. {
  325. return seq_list_next(p, &service_level_list, pos);
  326. }
  327. static void service_level_stop(struct seq_file *m, void *p)
  328. {
  329. up_read(&service_level_sem);
  330. }
  331. static int service_level_show(struct seq_file *m, void *p)
  332. {
  333. struct service_level *slr;
  334. slr = list_entry(p, struct service_level, list);
  335. slr->seq_print(m, slr);
  336. return 0;
  337. }
  338. static const struct seq_operations service_level_seq_ops = {
  339. .start = service_level_start,
  340. .next = service_level_next,
  341. .stop = service_level_stop,
  342. .show = service_level_show
  343. };
  344. static void service_level_vm_print(struct seq_file *m,
  345. struct service_level *slr)
  346. {
  347. char *query_buffer, *str;
  348. query_buffer = kmalloc(1024, GFP_KERNEL | GFP_DMA);
  349. if (!query_buffer)
  350. return;
  351. cpcmd("QUERY CPLEVEL", query_buffer, 1024, NULL);
  352. str = strchr(query_buffer, '\n');
  353. if (str)
  354. *str = 0;
  355. seq_printf(m, "VM: %s\n", query_buffer);
  356. kfree(query_buffer);
  357. }
  358. static struct service_level service_level_vm = {
  359. .seq_print = service_level_vm_print
  360. };
  361. static __init int create_proc_service_level(void)
  362. {
  363. proc_create_seq("service_levels", 0, NULL, &service_level_seq_ops);
  364. if (MACHINE_IS_VM)
  365. register_service_level(&service_level_vm);
  366. return 0;
  367. }
  368. subsys_initcall(create_proc_service_level);
  369. /*
  370. * CPU capability might have changed. Therefore recalculate loops_per_jiffy.
  371. */
  372. void s390_adjust_jiffies(void)
  373. {
  374. struct sysinfo_1_2_2 *info;
  375. unsigned long capability;
  376. struct kernel_fpu fpu;
  377. info = (void *) get_zeroed_page(GFP_KERNEL);
  378. if (!info)
  379. return;
  380. if (stsi(info, 1, 2, 2) == 0) {
  381. /*
  382. * Major sigh. The cpu capability encoding is "special".
  383. * If the first 9 bits of info->capability are 0 then it
  384. * is a 32 bit unsigned integer in the range 0 .. 2^23.
  385. * If the first 9 bits are != 0 then it is a 32 bit float.
  386. * In addition a lower value indicates a proportionally
  387. * higher cpu capacity. Bogomips are the other way round.
  388. * To get to a halfway suitable number we divide 1e7
  389. * by the cpu capability number. Yes, that means a floating
  390. * point division ..
  391. */
  392. kernel_fpu_begin(&fpu, KERNEL_FPR);
  393. asm volatile(
  394. " sfpc %3\n"
  395. " l %0,%1\n"
  396. " tmlh %0,0xff80\n"
  397. " jnz 0f\n"
  398. " cefbr %%f2,%0\n"
  399. " j 1f\n"
  400. "0: le %%f2,%1\n"
  401. "1: cefbr %%f0,%2\n"
  402. " debr %%f0,%%f2\n"
  403. " cgebr %0,5,%%f0\n"
  404. : "=&d" (capability)
  405. : "Q" (info->capability), "d" (10000000), "d" (0)
  406. : "cc"
  407. );
  408. kernel_fpu_end(&fpu, KERNEL_FPR);
  409. } else
  410. /*
  411. * Really old machine without stsi block for basic
  412. * cpu information. Report 42.0 bogomips.
  413. */
  414. capability = 42;
  415. loops_per_jiffy = capability * (500000/HZ);
  416. free_page((unsigned long) info);
  417. }
  418. /*
  419. * calibrate the delay loop
  420. */
  421. void calibrate_delay(void)
  422. {
  423. s390_adjust_jiffies();
  424. /* Print the good old Bogomips line .. */
  425. printk(KERN_DEBUG "Calibrating delay loop (skipped)... "
  426. "%lu.%02lu BogoMIPS preset\n", loops_per_jiffy/(500000/HZ),
  427. (loops_per_jiffy/(5000/HZ)) % 100);
  428. }
  429. #ifdef CONFIG_DEBUG_FS
  430. #define STSI_FILE(fc, s1, s2) \
  431. static int stsi_open_##fc##_##s1##_##s2(struct inode *inode, struct file *file)\
  432. { \
  433. file->private_data = (void *) get_zeroed_page(GFP_KERNEL); \
  434. if (!file->private_data) \
  435. return -ENOMEM; \
  436. if (stsi(file->private_data, fc, s1, s2)) { \
  437. free_page((unsigned long)file->private_data); \
  438. file->private_data = NULL; \
  439. return -EACCES; \
  440. } \
  441. return nonseekable_open(inode, file); \
  442. } \
  443. \
  444. static const struct file_operations stsi_##fc##_##s1##_##s2##_fs_ops = { \
  445. .open = stsi_open_##fc##_##s1##_##s2, \
  446. .release = stsi_release, \
  447. .read = stsi_read, \
  448. .llseek = no_llseek, \
  449. };
  450. static int stsi_release(struct inode *inode, struct file *file)
  451. {
  452. free_page((unsigned long)file->private_data);
  453. return 0;
  454. }
  455. static ssize_t stsi_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
  456. {
  457. return simple_read_from_buffer(buf, size, ppos, file->private_data, PAGE_SIZE);
  458. }
  459. STSI_FILE( 1, 1, 1);
  460. STSI_FILE( 1, 2, 1);
  461. STSI_FILE( 1, 2, 2);
  462. STSI_FILE( 2, 2, 1);
  463. STSI_FILE( 2, 2, 2);
  464. STSI_FILE( 3, 2, 2);
  465. STSI_FILE(15, 1, 2);
  466. STSI_FILE(15, 1, 3);
  467. STSI_FILE(15, 1, 4);
  468. STSI_FILE(15, 1, 5);
  469. STSI_FILE(15, 1, 6);
  470. struct stsi_file {
  471. const struct file_operations *fops;
  472. char *name;
  473. };
  474. static struct stsi_file stsi_file[] __initdata = {
  475. {.fops = &stsi_1_1_1_fs_ops, .name = "1_1_1"},
  476. {.fops = &stsi_1_2_1_fs_ops, .name = "1_2_1"},
  477. {.fops = &stsi_1_2_2_fs_ops, .name = "1_2_2"},
  478. {.fops = &stsi_2_2_1_fs_ops, .name = "2_2_1"},
  479. {.fops = &stsi_2_2_2_fs_ops, .name = "2_2_2"},
  480. {.fops = &stsi_3_2_2_fs_ops, .name = "3_2_2"},
  481. {.fops = &stsi_15_1_2_fs_ops, .name = "15_1_2"},
  482. {.fops = &stsi_15_1_3_fs_ops, .name = "15_1_3"},
  483. {.fops = &stsi_15_1_4_fs_ops, .name = "15_1_4"},
  484. {.fops = &stsi_15_1_5_fs_ops, .name = "15_1_5"},
  485. {.fops = &stsi_15_1_6_fs_ops, .name = "15_1_6"},
  486. };
  487. static u8 stsi_0_0_0;
  488. static __init int stsi_init_debugfs(void)
  489. {
  490. struct dentry *stsi_root;
  491. struct stsi_file *sf;
  492. int lvl, i;
  493. stsi_root = debugfs_create_dir("stsi", arch_debugfs_dir);
  494. if (IS_ERR_OR_NULL(stsi_root))
  495. return 0;
  496. lvl = stsi(NULL, 0, 0, 0);
  497. if (lvl > 0)
  498. stsi_0_0_0 = lvl;
  499. debugfs_create_u8("0_0_0", 0400, stsi_root, &stsi_0_0_0);
  500. for (i = 0; i < ARRAY_SIZE(stsi_file); i++) {
  501. sf = &stsi_file[i];
  502. debugfs_create_file(sf->name, 0400, stsi_root, NULL, sf->fops);
  503. }
  504. if (IS_ENABLED(CONFIG_SCHED_TOPOLOGY) && MACHINE_HAS_TOPOLOGY) {
  505. char link_to[10];
  506. sprintf(link_to, "15_1_%d", topology_mnest_limit());
  507. debugfs_create_symlink("topology", stsi_root, link_to);
  508. }
  509. return 0;
  510. }
  511. device_initcall(stsi_init_debugfs);
  512. #endif /* CONFIG_DEBUG_FS */