sysinfo.c 16 KB

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