rtas.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. /*
  2. *
  3. * Procedures for interfacing to the RTAS on CHRP machines.
  4. *
  5. * Peter Bergner, IBM March 2001.
  6. * Copyright (C) 2001 IBM.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version
  11. * 2 of the License, or (at your option) any later version.
  12. */
  13. #include <stdarg.h>
  14. #include <linux/kernel.h>
  15. #include <linux/types.h>
  16. #include <linux/spinlock.h>
  17. #include <linux/module.h>
  18. #include <linux/init.h>
  19. #include <linux/delay.h>
  20. #include <asm/prom.h>
  21. #include <asm/rtas.h>
  22. #include <asm/semaphore.h>
  23. #include <asm/machdep.h>
  24. #include <asm/page.h>
  25. #include <asm/param.h>
  26. #include <asm/system.h>
  27. #include <asm/delay.h>
  28. #include <asm/uaccess.h>
  29. #include <asm/lmb.h>
  30. #ifdef CONFIG_PPC64
  31. #include <asm/systemcfg.h>
  32. #endif
  33. struct rtas_t rtas = {
  34. .lock = SPIN_LOCK_UNLOCKED
  35. };
  36. EXPORT_SYMBOL(rtas);
  37. DEFINE_SPINLOCK(rtas_data_buf_lock);
  38. char rtas_data_buf[RTAS_DATA_BUF_SIZE] __cacheline_aligned;
  39. unsigned long rtas_rmo_buf;
  40. /*
  41. * If non-NULL, this gets called when the kernel terminates.
  42. * This is done like this so rtas_flash can be a module.
  43. */
  44. void (*rtas_flash_term_hook)(int);
  45. EXPORT_SYMBOL(rtas_flash_term_hook);
  46. /*
  47. * call_rtas_display_status and call_rtas_display_status_delay
  48. * are designed only for very early low-level debugging, which
  49. * is why the token is hard-coded to 10.
  50. */
  51. void call_rtas_display_status(unsigned char c)
  52. {
  53. struct rtas_args *args = &rtas.args;
  54. unsigned long s;
  55. if (!rtas.base)
  56. return;
  57. spin_lock_irqsave(&rtas.lock, s);
  58. args->token = 10;
  59. args->nargs = 1;
  60. args->nret = 1;
  61. args->rets = (rtas_arg_t *)&(args->args[1]);
  62. args->args[0] = (int)c;
  63. enter_rtas(__pa(args));
  64. spin_unlock_irqrestore(&rtas.lock, s);
  65. }
  66. void call_rtas_display_status_delay(unsigned char c)
  67. {
  68. static int pending_newline = 0; /* did last write end with unprinted newline? */
  69. static int width = 16;
  70. if (c == '\n') {
  71. while (width-- > 0)
  72. call_rtas_display_status(' ');
  73. width = 16;
  74. mdelay(500);
  75. pending_newline = 1;
  76. } else {
  77. if (pending_newline) {
  78. call_rtas_display_status('\r');
  79. call_rtas_display_status('\n');
  80. }
  81. pending_newline = 0;
  82. if (width--) {
  83. call_rtas_display_status(c);
  84. udelay(10000);
  85. }
  86. }
  87. }
  88. void rtas_progress(char *s, unsigned short hex)
  89. {
  90. struct device_node *root;
  91. int width, *p;
  92. char *os;
  93. static int display_character, set_indicator;
  94. static int display_width, display_lines, *row_width, form_feed;
  95. static DEFINE_SPINLOCK(progress_lock);
  96. static int current_line;
  97. static int pending_newline = 0; /* did last write end with unprinted newline? */
  98. if (!rtas.base)
  99. return;
  100. if (display_width == 0) {
  101. display_width = 0x10;
  102. if ((root = find_path_device("/rtas"))) {
  103. if ((p = (unsigned int *)get_property(root,
  104. "ibm,display-line-length", NULL)))
  105. display_width = *p;
  106. if ((p = (unsigned int *)get_property(root,
  107. "ibm,form-feed", NULL)))
  108. form_feed = *p;
  109. if ((p = (unsigned int *)get_property(root,
  110. "ibm,display-number-of-lines", NULL)))
  111. display_lines = *p;
  112. row_width = (unsigned int *)get_property(root,
  113. "ibm,display-truncation-length", NULL);
  114. }
  115. display_character = rtas_token("display-character");
  116. set_indicator = rtas_token("set-indicator");
  117. }
  118. if (display_character == RTAS_UNKNOWN_SERVICE) {
  119. /* use hex display if available */
  120. if (set_indicator != RTAS_UNKNOWN_SERVICE)
  121. rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
  122. return;
  123. }
  124. spin_lock(&progress_lock);
  125. /*
  126. * Last write ended with newline, but we didn't print it since
  127. * it would just clear the bottom line of output. Print it now
  128. * instead.
  129. *
  130. * If no newline is pending and form feed is supported, clear the
  131. * display with a form feed; otherwise, print a CR to start output
  132. * at the beginning of the line.
  133. */
  134. if (pending_newline) {
  135. rtas_call(display_character, 1, 1, NULL, '\r');
  136. rtas_call(display_character, 1, 1, NULL, '\n');
  137. pending_newline = 0;
  138. } else {
  139. current_line = 0;
  140. if (form_feed)
  141. rtas_call(display_character, 1, 1, NULL,
  142. (char)form_feed);
  143. else
  144. rtas_call(display_character, 1, 1, NULL, '\r');
  145. }
  146. if (row_width)
  147. width = row_width[current_line];
  148. else
  149. width = display_width;
  150. os = s;
  151. while (*os) {
  152. if (*os == '\n' || *os == '\r') {
  153. /* If newline is the last character, save it
  154. * until next call to avoid bumping up the
  155. * display output.
  156. */
  157. if (*os == '\n' && !os[1]) {
  158. pending_newline = 1;
  159. current_line++;
  160. if (current_line > display_lines-1)
  161. current_line = display_lines-1;
  162. spin_unlock(&progress_lock);
  163. return;
  164. }
  165. /* RTAS wants CR-LF, not just LF */
  166. if (*os == '\n') {
  167. rtas_call(display_character, 1, 1, NULL, '\r');
  168. rtas_call(display_character, 1, 1, NULL, '\n');
  169. } else {
  170. /* CR might be used to re-draw a line, so we'll
  171. * leave it alone and not add LF.
  172. */
  173. rtas_call(display_character, 1, 1, NULL, *os);
  174. }
  175. if (row_width)
  176. width = row_width[current_line];
  177. else
  178. width = display_width;
  179. } else {
  180. width--;
  181. rtas_call(display_character, 1, 1, NULL, *os);
  182. }
  183. os++;
  184. /* if we overwrite the screen length */
  185. if (width <= 0)
  186. while ((*os != 0) && (*os != '\n') && (*os != '\r'))
  187. os++;
  188. }
  189. spin_unlock(&progress_lock);
  190. }
  191. EXPORT_SYMBOL(rtas_progress); /* needed by rtas_flash module */
  192. int rtas_token(const char *service)
  193. {
  194. int *tokp;
  195. if (rtas.dev == NULL)
  196. return RTAS_UNKNOWN_SERVICE;
  197. tokp = (int *) get_property(rtas.dev, service, NULL);
  198. return tokp ? *tokp : RTAS_UNKNOWN_SERVICE;
  199. }
  200. #ifdef CONFIG_RTAS_ERROR_LOGGING
  201. /*
  202. * Return the firmware-specified size of the error log buffer
  203. * for all rtas calls that require an error buffer argument.
  204. * This includes 'check-exception' and 'rtas-last-error'.
  205. */
  206. int rtas_get_error_log_max(void)
  207. {
  208. static int rtas_error_log_max;
  209. if (rtas_error_log_max)
  210. return rtas_error_log_max;
  211. rtas_error_log_max = rtas_token ("rtas-error-log-max");
  212. if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) ||
  213. (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) {
  214. printk (KERN_WARNING "RTAS: bad log buffer size %d\n",
  215. rtas_error_log_max);
  216. rtas_error_log_max = RTAS_ERROR_LOG_MAX;
  217. }
  218. return rtas_error_log_max;
  219. }
  220. EXPORT_SYMBOL(rtas_get_error_log_max);
  221. char rtas_err_buf[RTAS_ERROR_LOG_MAX];
  222. int rtas_last_error_token;
  223. /** Return a copy of the detailed error text associated with the
  224. * most recent failed call to rtas. Because the error text
  225. * might go stale if there are any other intervening rtas calls,
  226. * this routine must be called atomically with whatever produced
  227. * the error (i.e. with rtas.lock still held from the previous call).
  228. */
  229. static char *__fetch_rtas_last_error(char *altbuf)
  230. {
  231. struct rtas_args err_args, save_args;
  232. u32 bufsz;
  233. char *buf = NULL;
  234. if (rtas_last_error_token == -1)
  235. return NULL;
  236. bufsz = rtas_get_error_log_max();
  237. err_args.token = rtas_last_error_token;
  238. err_args.nargs = 2;
  239. err_args.nret = 1;
  240. err_args.args[0] = (rtas_arg_t)__pa(rtas_err_buf);
  241. err_args.args[1] = bufsz;
  242. err_args.args[2] = 0;
  243. save_args = rtas.args;
  244. rtas.args = err_args;
  245. enter_rtas(__pa(&rtas.args));
  246. err_args = rtas.args;
  247. rtas.args = save_args;
  248. /* Log the error in the unlikely case that there was one. */
  249. if (unlikely(err_args.args[2] == 0)) {
  250. if (altbuf) {
  251. buf = altbuf;
  252. } else {
  253. buf = rtas_err_buf;
  254. if (mem_init_done)
  255. buf = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
  256. }
  257. if (buf)
  258. memcpy(buf, rtas_err_buf, RTAS_ERROR_LOG_MAX);
  259. }
  260. return buf;
  261. }
  262. #define get_errorlog_buffer() kmalloc(RTAS_ERROR_LOG_MAX, GFP_KERNEL)
  263. #else /* CONFIG_RTAS_ERROR_LOGGING */
  264. #define __fetch_rtas_last_error(x) NULL
  265. #define get_errorlog_buffer() NULL
  266. #endif
  267. int rtas_call(int token, int nargs, int nret, int *outputs, ...)
  268. {
  269. va_list list;
  270. int i;
  271. unsigned long s;
  272. struct rtas_args *rtas_args;
  273. char *buff_copy = NULL;
  274. int ret;
  275. if (token == RTAS_UNKNOWN_SERVICE)
  276. return -1;
  277. /* Gotta do something different here, use global lock for now... */
  278. spin_lock_irqsave(&rtas.lock, s);
  279. rtas_args = &rtas.args;
  280. rtas_args->token = token;
  281. rtas_args->nargs = nargs;
  282. rtas_args->nret = nret;
  283. rtas_args->rets = (rtas_arg_t *)&(rtas_args->args[nargs]);
  284. va_start(list, outputs);
  285. for (i = 0; i < nargs; ++i)
  286. rtas_args->args[i] = va_arg(list, rtas_arg_t);
  287. va_end(list);
  288. for (i = 0; i < nret; ++i)
  289. rtas_args->rets[i] = 0;
  290. enter_rtas(__pa(rtas_args));
  291. /* A -1 return code indicates that the last command couldn't
  292. be completed due to a hardware error. */
  293. if (rtas_args->rets[0] == -1)
  294. buff_copy = __fetch_rtas_last_error(NULL);
  295. if (nret > 1 && outputs != NULL)
  296. for (i = 0; i < nret-1; ++i)
  297. outputs[i] = rtas_args->rets[i+1];
  298. ret = (nret > 0)? rtas_args->rets[0]: 0;
  299. /* Gotta do something different here, use global lock for now... */
  300. spin_unlock_irqrestore(&rtas.lock, s);
  301. if (buff_copy) {
  302. log_error(buff_copy, ERR_TYPE_RTAS_LOG, 0);
  303. if (mem_init_done)
  304. kfree(buff_copy);
  305. }
  306. return ret;
  307. }
  308. /* Given an RTAS status code of 990n compute the hinted delay of 10^n
  309. * (last digit) milliseconds. For now we bound at n=5 (100 sec).
  310. */
  311. unsigned int rtas_extended_busy_delay_time(int status)
  312. {
  313. int order = status - 9900;
  314. unsigned long ms;
  315. if (order < 0)
  316. order = 0; /* RTC depends on this for -2 clock busy */
  317. else if (order > 5)
  318. order = 5; /* bound */
  319. /* Use microseconds for reasonable accuracy */
  320. for (ms = 1; order > 0; order--)
  321. ms *= 10;
  322. return ms;
  323. }
  324. int rtas_error_rc(int rtas_rc)
  325. {
  326. int rc;
  327. switch (rtas_rc) {
  328. case -1: /* Hardware Error */
  329. rc = -EIO;
  330. break;
  331. case -3: /* Bad indicator/domain/etc */
  332. rc = -EINVAL;
  333. break;
  334. case -9000: /* Isolation error */
  335. rc = -EFAULT;
  336. break;
  337. case -9001: /* Outstanding TCE/PTE */
  338. rc = -EEXIST;
  339. break;
  340. case -9002: /* No usable slot */
  341. rc = -ENODEV;
  342. break;
  343. default:
  344. printk(KERN_ERR "%s: unexpected RTAS error %d\n",
  345. __FUNCTION__, rtas_rc);
  346. rc = -ERANGE;
  347. break;
  348. }
  349. return rc;
  350. }
  351. int rtas_get_power_level(int powerdomain, int *level)
  352. {
  353. int token = rtas_token("get-power-level");
  354. int rc;
  355. if (token == RTAS_UNKNOWN_SERVICE)
  356. return -ENOENT;
  357. while ((rc = rtas_call(token, 1, 2, level, powerdomain)) == RTAS_BUSY)
  358. udelay(1);
  359. if (rc < 0)
  360. return rtas_error_rc(rc);
  361. return rc;
  362. }
  363. int rtas_set_power_level(int powerdomain, int level, int *setlevel)
  364. {
  365. int token = rtas_token("set-power-level");
  366. unsigned int wait_time;
  367. int rc;
  368. if (token == RTAS_UNKNOWN_SERVICE)
  369. return -ENOENT;
  370. while (1) {
  371. rc = rtas_call(token, 2, 2, setlevel, powerdomain, level);
  372. if (rc == RTAS_BUSY)
  373. udelay(1);
  374. else if (rtas_is_extended_busy(rc)) {
  375. wait_time = rtas_extended_busy_delay_time(rc);
  376. udelay(wait_time * 1000);
  377. } else
  378. break;
  379. }
  380. if (rc < 0)
  381. return rtas_error_rc(rc);
  382. return rc;
  383. }
  384. int rtas_get_sensor(int sensor, int index, int *state)
  385. {
  386. int token = rtas_token("get-sensor-state");
  387. unsigned int wait_time;
  388. int rc;
  389. if (token == RTAS_UNKNOWN_SERVICE)
  390. return -ENOENT;
  391. while (1) {
  392. rc = rtas_call(token, 2, 2, state, sensor, index);
  393. if (rc == RTAS_BUSY)
  394. udelay(1);
  395. else if (rtas_is_extended_busy(rc)) {
  396. wait_time = rtas_extended_busy_delay_time(rc);
  397. udelay(wait_time * 1000);
  398. } else
  399. break;
  400. }
  401. if (rc < 0)
  402. return rtas_error_rc(rc);
  403. return rc;
  404. }
  405. int rtas_set_indicator(int indicator, int index, int new_value)
  406. {
  407. int token = rtas_token("set-indicator");
  408. unsigned int wait_time;
  409. int rc;
  410. if (token == RTAS_UNKNOWN_SERVICE)
  411. return -ENOENT;
  412. while (1) {
  413. rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
  414. if (rc == RTAS_BUSY)
  415. udelay(1);
  416. else if (rtas_is_extended_busy(rc)) {
  417. wait_time = rtas_extended_busy_delay_time(rc);
  418. udelay(wait_time * 1000);
  419. }
  420. else
  421. break;
  422. }
  423. if (rc < 0)
  424. return rtas_error_rc(rc);
  425. return rc;
  426. }
  427. void rtas_restart(char *cmd)
  428. {
  429. if (rtas_flash_term_hook)
  430. rtas_flash_term_hook(SYS_RESTART);
  431. printk("RTAS system-reboot returned %d\n",
  432. rtas_call(rtas_token("system-reboot"), 0, 1, NULL));
  433. for (;;);
  434. }
  435. void rtas_power_off(void)
  436. {
  437. if (rtas_flash_term_hook)
  438. rtas_flash_term_hook(SYS_POWER_OFF);
  439. /* allow power on only with power button press */
  440. printk("RTAS power-off returned %d\n",
  441. rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
  442. for (;;);
  443. }
  444. void rtas_halt(void)
  445. {
  446. if (rtas_flash_term_hook)
  447. rtas_flash_term_hook(SYS_HALT);
  448. /* allow power on only with power button press */
  449. printk("RTAS power-off returned %d\n",
  450. rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
  451. for (;;);
  452. }
  453. /* Must be in the RMO region, so we place it here */
  454. static char rtas_os_term_buf[2048];
  455. void rtas_os_term(char *str)
  456. {
  457. int status;
  458. if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
  459. return;
  460. snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
  461. do {
  462. status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
  463. __pa(rtas_os_term_buf));
  464. if (status == RTAS_BUSY)
  465. udelay(1);
  466. else if (status != 0)
  467. printk(KERN_EMERG "ibm,os-term call failed %d\n",
  468. status);
  469. } while (status == RTAS_BUSY);
  470. }
  471. asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
  472. {
  473. struct rtas_args args;
  474. unsigned long flags;
  475. char *buff_copy, *errbuf = NULL;
  476. int nargs;
  477. if (!capable(CAP_SYS_ADMIN))
  478. return -EPERM;
  479. if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
  480. return -EFAULT;
  481. nargs = args.nargs;
  482. if (nargs > ARRAY_SIZE(args.args)
  483. || args.nret > ARRAY_SIZE(args.args)
  484. || nargs + args.nret > ARRAY_SIZE(args.args))
  485. return -EINVAL;
  486. /* Copy in args. */
  487. if (copy_from_user(args.args, uargs->args,
  488. nargs * sizeof(rtas_arg_t)) != 0)
  489. return -EFAULT;
  490. buff_copy = get_errorlog_buffer();
  491. spin_lock_irqsave(&rtas.lock, flags);
  492. rtas.args = args;
  493. enter_rtas(__pa(&rtas.args));
  494. args = rtas.args;
  495. args.rets = &args.args[nargs];
  496. /* A -1 return code indicates that the last command couldn't
  497. be completed due to a hardware error. */
  498. if (args.rets[0] == -1)
  499. errbuf = __fetch_rtas_last_error(buff_copy);
  500. spin_unlock_irqrestore(&rtas.lock, flags);
  501. if (buff_copy) {
  502. if (errbuf)
  503. log_error(errbuf, ERR_TYPE_RTAS_LOG, 0);
  504. kfree(buff_copy);
  505. }
  506. /* Copy out args. */
  507. if (copy_to_user(uargs->args + nargs,
  508. args.args + nargs,
  509. args.nret * sizeof(rtas_arg_t)) != 0)
  510. return -EFAULT;
  511. return 0;
  512. }
  513. /* This version can't take the spinlock, because it never returns */
  514. struct rtas_args rtas_stop_self_args = {
  515. /* The token is initialized for real in setup_system() */
  516. .token = RTAS_UNKNOWN_SERVICE,
  517. .nargs = 0,
  518. .nret = 1,
  519. .rets = &rtas_stop_self_args.args[0],
  520. };
  521. void rtas_stop_self(void)
  522. {
  523. struct rtas_args *rtas_args = &rtas_stop_self_args;
  524. local_irq_disable();
  525. BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
  526. printk("cpu %u (hwid %u) Ready to die...\n",
  527. smp_processor_id(), hard_smp_processor_id());
  528. enter_rtas(__pa(rtas_args));
  529. panic("Alas, I survived.\n");
  530. }
  531. /*
  532. * Call early during boot, before mem init or bootmem, to retreive the RTAS
  533. * informations from the device-tree and allocate the RMO buffer for userland
  534. * accesses.
  535. */
  536. void __init rtas_initialize(void)
  537. {
  538. unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
  539. /* Get RTAS dev node and fill up our "rtas" structure with infos
  540. * about it.
  541. */
  542. rtas.dev = of_find_node_by_name(NULL, "rtas");
  543. if (rtas.dev) {
  544. u32 *basep, *entryp;
  545. u32 *sizep;
  546. basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL);
  547. sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL);
  548. if (basep != NULL && sizep != NULL) {
  549. rtas.base = *basep;
  550. rtas.size = *sizep;
  551. entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL);
  552. if (entryp == NULL) /* Ugh */
  553. rtas.entry = rtas.base;
  554. else
  555. rtas.entry = *entryp;
  556. } else
  557. rtas.dev = NULL;
  558. }
  559. if (!rtas.dev)
  560. return;
  561. /* If RTAS was found, allocate the RMO buffer for it and look for
  562. * the stop-self token if any
  563. */
  564. #ifdef CONFIG_PPC64
  565. if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
  566. rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
  567. #endif
  568. rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);
  569. #ifdef CONFIG_HOTPLUG_CPU
  570. rtas_stop_self_args.token = rtas_token("stop-self");
  571. #endif /* CONFIG_HOTPLUG_CPU */
  572. #ifdef CONFIG_RTAS_ERROR_LOGGING
  573. rtas_last_error_token = rtas_token("rtas-last-error");
  574. #endif
  575. }
  576. EXPORT_SYMBOL(rtas_token);
  577. EXPORT_SYMBOL(rtas_call);
  578. EXPORT_SYMBOL(rtas_data_buf);
  579. EXPORT_SYMBOL(rtas_data_buf_lock);
  580. EXPORT_SYMBOL(rtas_extended_busy_delay_time);
  581. EXPORT_SYMBOL(rtas_get_sensor);
  582. EXPORT_SYMBOL(rtas_get_power_level);
  583. EXPORT_SYMBOL(rtas_set_power_level);
  584. EXPORT_SYMBOL(rtas_set_indicator);