[NETLINK]: w1_int.c: fix default netlink group
[linux-2.6/verdex.git] / arch / ppc64 / kernel / rtas.c
blob5e8eb33b8e54067290aa10762239c48dde9ff07d
1 /*
3 * Procedures for interfacing to the RTAS on CHRP machines.
5 * Peter Bergner, IBM March 2001.
6 * Copyright (C) 2001 IBM.
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.
14 #include <stdarg.h>
15 #include <linux/kernel.h>
16 #include <linux/types.h>
17 #include <linux/spinlock.h>
18 #include <linux/module.h>
19 #include <linux/init.h>
21 #include <asm/prom.h>
22 #include <asm/rtas.h>
23 #include <asm/semaphore.h>
24 #include <asm/machdep.h>
25 #include <asm/page.h>
26 #include <asm/param.h>
27 #include <asm/system.h>
28 #include <asm/abs_addr.h>
29 #include <asm/udbg.h>
30 #include <asm/delay.h>
31 #include <asm/uaccess.h>
32 #include <asm/systemcfg.h>
34 struct flash_block_list_header rtas_firmware_flash_list = {0, NULL};
36 struct rtas_t rtas = {
37 .lock = SPIN_LOCK_UNLOCKED
40 EXPORT_SYMBOL(rtas);
42 char rtas_err_buf[RTAS_ERROR_LOG_MAX];
44 DEFINE_SPINLOCK(rtas_data_buf_lock);
45 char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned;
46 unsigned long rtas_rmo_buf;
48 void
49 call_rtas_display_status(unsigned char c)
51 struct rtas_args *args = &rtas.args;
52 unsigned long s;
54 if (!rtas.base)
55 return;
56 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;
64 enter_rtas(__pa(args));
66 spin_unlock_irqrestore(&rtas.lock, s);
69 void
70 call_rtas_display_status_delay(unsigned char c)
72 static int pending_newline = 0; /* did last write end with unprinted newline? */
73 static int width = 16;
75 if (c == '\n') {
76 while (width-- > 0)
77 call_rtas_display_status(' ');
78 width = 16;
79 udelay(500000);
80 pending_newline = 1;
81 } else {
82 if (pending_newline) {
83 call_rtas_display_status('\r');
84 call_rtas_display_status('\n');
86 pending_newline = 0;
87 if (width--) {
88 call_rtas_display_status(c);
89 udelay(10000);
94 void
95 rtas_progress(char *s, unsigned short hex)
97 struct device_node *root;
98 int width, *p;
99 char *os;
100 static int display_character, set_indicator;
101 static int display_width, display_lines, *row_width, form_feed;
102 static DEFINE_SPINLOCK(progress_lock);
103 static int current_line;
104 static int pending_newline = 0; /* did last write end with unprinted newline? */
106 if (!rtas.base)
107 return;
109 if (display_width == 0) {
110 display_width = 0x10;
111 if ((root = find_path_device("/rtas"))) {
112 if ((p = (unsigned int *)get_property(root,
113 "ibm,display-line-length", NULL)))
114 display_width = *p;
115 if ((p = (unsigned int *)get_property(root,
116 "ibm,form-feed", NULL)))
117 form_feed = *p;
118 if ((p = (unsigned int *)get_property(root,
119 "ibm,display-number-of-lines", NULL)))
120 display_lines = *p;
121 row_width = (unsigned int *)get_property(root,
122 "ibm,display-truncation-length", NULL);
124 display_character = rtas_token("display-character");
125 set_indicator = rtas_token("set-indicator");
128 if (display_character == RTAS_UNKNOWN_SERVICE) {
129 /* use hex display if available */
130 if (set_indicator != RTAS_UNKNOWN_SERVICE)
131 rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
132 return;
135 spin_lock(&progress_lock);
138 * Last write ended with newline, but we didn't print it since
139 * it would just clear the bottom line of output. Print it now
140 * instead.
142 * If no newline is pending and form feed is supported, clear the
143 * display with a form feed; otherwise, print a CR to start output
144 * at the beginning of the line.
146 if (pending_newline) {
147 rtas_call(display_character, 1, 1, NULL, '\r');
148 rtas_call(display_character, 1, 1, NULL, '\n');
149 pending_newline = 0;
150 } else {
151 current_line = 0;
152 if (form_feed)
153 rtas_call(display_character, 1, 1, NULL,
154 (char)form_feed);
155 else
156 rtas_call(display_character, 1, 1, NULL, '\r');
159 if (row_width)
160 width = row_width[current_line];
161 else
162 width = display_width;
163 os = s;
164 while (*os) {
165 if (*os == '\n' || *os == '\r') {
166 /* If newline is the last character, save it
167 * until next call to avoid bumping up the
168 * display output.
170 if (*os == '\n' && !os[1]) {
171 pending_newline = 1;
172 current_line++;
173 if (current_line > display_lines-1)
174 current_line = display_lines-1;
175 spin_unlock(&progress_lock);
176 return;
179 /* RTAS wants CR-LF, not just LF */
181 if (*os == '\n') {
182 rtas_call(display_character, 1, 1, NULL, '\r');
183 rtas_call(display_character, 1, 1, NULL, '\n');
184 } else {
185 /* CR might be used to re-draw a line, so we'll
186 * leave it alone and not add LF.
188 rtas_call(display_character, 1, 1, NULL, *os);
191 if (row_width)
192 width = row_width[current_line];
193 else
194 width = display_width;
195 } else {
196 width--;
197 rtas_call(display_character, 1, 1, NULL, *os);
200 os++;
202 /* if we overwrite the screen length */
203 if (width <= 0)
204 while ((*os != 0) && (*os != '\n') && (*os != '\r'))
205 os++;
208 spin_unlock(&progress_lock);
212 rtas_token(const char *service)
214 int *tokp;
215 if (rtas.dev == NULL) {
216 PPCDBG(PPCDBG_RTAS,"\tNo rtas device in device-tree...\n");
217 return RTAS_UNKNOWN_SERVICE;
219 tokp = (int *) get_property(rtas.dev, service, NULL);
220 return tokp ? *tokp : RTAS_UNKNOWN_SERVICE;
224 * Return the firmware-specified size of the error log buffer
225 * for all rtas calls that require an error buffer argument.
226 * This includes 'check-exception' and 'rtas-last-error'.
228 int rtas_get_error_log_max(void)
230 static int rtas_error_log_max;
231 if (rtas_error_log_max)
232 return rtas_error_log_max;
234 rtas_error_log_max = rtas_token ("rtas-error-log-max");
235 if ((rtas_error_log_max == RTAS_UNKNOWN_SERVICE) ||
236 (rtas_error_log_max > RTAS_ERROR_LOG_MAX)) {
237 printk (KERN_WARNING "RTAS: bad log buffer size %d\n", rtas_error_log_max);
238 rtas_error_log_max = RTAS_ERROR_LOG_MAX;
240 return rtas_error_log_max;
244 /** Return a copy of the detailed error text associated with the
245 * most recent failed call to rtas. Because the error text
246 * might go stale if there are any other intervening rtas calls,
247 * this routine must be called atomically with whatever produced
248 * the error (i.e. with rtas.lock still held from the previous call).
250 static int
251 __fetch_rtas_last_error(void)
253 struct rtas_args err_args, save_args;
254 u32 bufsz;
256 bufsz = rtas_get_error_log_max();
258 err_args.token = rtas_token("rtas-last-error");
259 err_args.nargs = 2;
260 err_args.nret = 1;
262 err_args.args[0] = (rtas_arg_t)__pa(rtas_err_buf);
263 err_args.args[1] = bufsz;
264 err_args.args[2] = 0;
266 save_args = rtas.args;
267 rtas.args = err_args;
269 enter_rtas(__pa(&rtas.args));
271 err_args = rtas.args;
272 rtas.args = save_args;
274 return err_args.args[2];
277 int rtas_call(int token, int nargs, int nret, int *outputs, ...)
279 va_list list;
280 int i, logit = 0;
281 unsigned long s;
282 struct rtas_args *rtas_args;
283 char * buff_copy = NULL;
284 int ret;
286 PPCDBG(PPCDBG_RTAS, "Entering rtas_call\n");
287 PPCDBG(PPCDBG_RTAS, "\ttoken = 0x%x\n", token);
288 PPCDBG(PPCDBG_RTAS, "\tnargs = %d\n", nargs);
289 PPCDBG(PPCDBG_RTAS, "\tnret = %d\n", nret);
290 PPCDBG(PPCDBG_RTAS, "\t&outputs = 0x%lx\n", outputs);
291 if (token == RTAS_UNKNOWN_SERVICE)
292 return -1;
294 /* Gotta do something different here, use global lock for now... */
295 spin_lock_irqsave(&rtas.lock, s);
296 rtas_args = &rtas.args;
298 rtas_args->token = token;
299 rtas_args->nargs = nargs;
300 rtas_args->nret = nret;
301 rtas_args->rets = (rtas_arg_t *)&(rtas_args->args[nargs]);
302 va_start(list, outputs);
303 for (i = 0; i < nargs; ++i) {
304 rtas_args->args[i] = va_arg(list, rtas_arg_t);
305 PPCDBG(PPCDBG_RTAS, "\tnarg[%d] = 0x%x\n", i, rtas_args->args[i]);
307 va_end(list);
309 for (i = 0; i < nret; ++i)
310 rtas_args->rets[i] = 0;
312 PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n",
313 __pa(rtas_args));
314 enter_rtas(__pa(rtas_args));
315 PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n");
317 /* A -1 return code indicates that the last command couldn't
318 be completed due to a hardware error. */
319 if (rtas_args->rets[0] == -1)
320 logit = (__fetch_rtas_last_error() == 0);
322 ifppcdebug(PPCDBG_RTAS) {
323 for(i=0; i < nret ;i++)
324 udbg_printf("\tnret[%d] = 0x%lx\n", i, (ulong)rtas_args->rets[i]);
327 if (nret > 1 && outputs != NULL)
328 for (i = 0; i < nret-1; ++i)
329 outputs[i] = rtas_args->rets[i+1];
330 ret = (nret > 0)? rtas_args->rets[0]: 0;
332 /* Log the error in the unlikely case that there was one. */
333 if (unlikely(logit)) {
334 buff_copy = rtas_err_buf;
335 if (mem_init_done) {
336 buff_copy = kmalloc(RTAS_ERROR_LOG_MAX, GFP_ATOMIC);
337 if (buff_copy)
338 memcpy(buff_copy, rtas_err_buf,
339 RTAS_ERROR_LOG_MAX);
343 /* Gotta do something different here, use global lock for now... */
344 spin_unlock_irqrestore(&rtas.lock, s);
346 if (buff_copy) {
347 log_error(buff_copy, ERR_TYPE_RTAS_LOG, 0);
348 if (mem_init_done)
349 kfree(buff_copy);
351 return ret;
354 /* Given an RTAS status code of 990n compute the hinted delay of 10^n
355 * (last digit) milliseconds. For now we bound at n=5 (100 sec).
357 unsigned int
358 rtas_extended_busy_delay_time(int status)
360 int order = status - 9900;
361 unsigned long ms;
363 if (order < 0)
364 order = 0; /* RTC depends on this for -2 clock busy */
365 else if (order > 5)
366 order = 5; /* bound */
368 /* Use microseconds for reasonable accuracy */
369 for (ms=1; order > 0; order--)
370 ms *= 10;
372 return ms;
375 int rtas_error_rc(int rtas_rc)
377 int rc;
379 switch (rtas_rc) {
380 case -1: /* Hardware Error */
381 rc = -EIO;
382 break;
383 case -3: /* Bad indicator/domain/etc */
384 rc = -EINVAL;
385 break;
386 case -9000: /* Isolation error */
387 rc = -EFAULT;
388 break;
389 case -9001: /* Outstanding TCE/PTE */
390 rc = -EEXIST;
391 break;
392 case -9002: /* No usable slot */
393 rc = -ENODEV;
394 break;
395 default:
396 printk(KERN_ERR "%s: unexpected RTAS error %d\n",
397 __FUNCTION__, rtas_rc);
398 rc = -ERANGE;
399 break;
401 return rc;
404 int rtas_get_power_level(int powerdomain, int *level)
406 int token = rtas_token("get-power-level");
407 int rc;
409 if (token == RTAS_UNKNOWN_SERVICE)
410 return -ENOENT;
412 while ((rc = rtas_call(token, 1, 2, level, powerdomain)) == RTAS_BUSY)
413 udelay(1);
415 if (rc < 0)
416 return rtas_error_rc(rc);
417 return rc;
420 int rtas_set_power_level(int powerdomain, int level, int *setlevel)
422 int token = rtas_token("set-power-level");
423 unsigned int wait_time;
424 int rc;
426 if (token == RTAS_UNKNOWN_SERVICE)
427 return -ENOENT;
429 while (1) {
430 rc = rtas_call(token, 2, 2, setlevel, powerdomain, level);
431 if (rc == RTAS_BUSY)
432 udelay(1);
433 else if (rtas_is_extended_busy(rc)) {
434 wait_time = rtas_extended_busy_delay_time(rc);
435 udelay(wait_time * 1000);
436 } else
437 break;
440 if (rc < 0)
441 return rtas_error_rc(rc);
442 return rc;
445 int rtas_get_sensor(int sensor, int index, int *state)
447 int token = rtas_token("get-sensor-state");
448 unsigned int wait_time;
449 int rc;
451 if (token == RTAS_UNKNOWN_SERVICE)
452 return -ENOENT;
454 while (1) {
455 rc = rtas_call(token, 2, 2, state, sensor, index);
456 if (rc == RTAS_BUSY)
457 udelay(1);
458 else if (rtas_is_extended_busy(rc)) {
459 wait_time = rtas_extended_busy_delay_time(rc);
460 udelay(wait_time * 1000);
461 } else
462 break;
465 if (rc < 0)
466 return rtas_error_rc(rc);
467 return rc;
470 int rtas_set_indicator(int indicator, int index, int new_value)
472 int token = rtas_token("set-indicator");
473 unsigned int wait_time;
474 int rc;
476 if (token == RTAS_UNKNOWN_SERVICE)
477 return -ENOENT;
479 while (1) {
480 rc = rtas_call(token, 3, 1, NULL, indicator, index, new_value);
481 if (rc == RTAS_BUSY)
482 udelay(1);
483 else if (rtas_is_extended_busy(rc)) {
484 wait_time = rtas_extended_busy_delay_time(rc);
485 udelay(wait_time * 1000);
487 else
488 break;
491 if (rc < 0)
492 return rtas_error_rc(rc);
493 return rc;
496 #define FLASH_BLOCK_LIST_VERSION (1UL)
497 static void
498 rtas_flash_firmware(void)
500 unsigned long image_size;
501 struct flash_block_list *f, *next, *flist;
502 unsigned long rtas_block_list;
503 int i, status, update_token;
505 update_token = rtas_token("ibm,update-flash-64-and-reboot");
506 if (update_token == RTAS_UNKNOWN_SERVICE) {
507 printk(KERN_ALERT "FLASH: ibm,update-flash-64-and-reboot is not available -- not a service partition?\n");
508 printk(KERN_ALERT "FLASH: firmware will not be flashed\n");
509 return;
512 /* NOTE: the "first" block list is a global var with no data
513 * blocks in the kernel data segment. We do this because
514 * we want to ensure this block_list addr is under 4GB.
516 rtas_firmware_flash_list.num_blocks = 0;
517 flist = (struct flash_block_list *)&rtas_firmware_flash_list;
518 rtas_block_list = virt_to_abs(flist);
519 if (rtas_block_list >= 4UL*1024*1024*1024) {
520 printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");
521 return;
524 printk(KERN_ALERT "FLASH: preparing saved firmware image for flash\n");
525 /* Update the block_list in place. */
526 image_size = 0;
527 for (f = flist; f; f = next) {
528 /* Translate data addrs to absolute */
529 for (i = 0; i < f->num_blocks; i++) {
530 f->blocks[i].data = (char *)virt_to_abs(f->blocks[i].data);
531 image_size += f->blocks[i].length;
533 next = f->next;
534 /* Don't translate NULL pointer for last entry */
535 if (f->next)
536 f->next = (struct flash_block_list *)virt_to_abs(f->next);
537 else
538 f->next = NULL;
539 /* make num_blocks into the version/length field */
540 f->num_blocks = (FLASH_BLOCK_LIST_VERSION << 56) | ((f->num_blocks+1)*16);
543 printk(KERN_ALERT "FLASH: flash image is %ld bytes\n", image_size);
544 printk(KERN_ALERT "FLASH: performing flash and reboot\n");
545 rtas_progress("Flashing \n", 0x0);
546 rtas_progress("Please Wait... ", 0x0);
547 printk(KERN_ALERT "FLASH: this will take several minutes. Do not power off!\n");
548 status = rtas_call(update_token, 1, 1, NULL, rtas_block_list);
549 switch (status) { /* should only get "bad" status */
550 case 0:
551 printk(KERN_ALERT "FLASH: success\n");
552 break;
553 case -1:
554 printk(KERN_ALERT "FLASH: hardware error. Firmware may not be not flashed\n");
555 break;
556 case -3:
557 printk(KERN_ALERT "FLASH: image is corrupt or not correct for this platform. Firmware not flashed\n");
558 break;
559 case -4:
560 printk(KERN_ALERT "FLASH: flash failed when partially complete. System may not reboot\n");
561 break;
562 default:
563 printk(KERN_ALERT "FLASH: unknown flash return code %d\n", status);
564 break;
568 void rtas_flash_bypass_warning(void)
570 printk(KERN_ALERT "FLASH: firmware flash requires a reboot\n");
571 printk(KERN_ALERT "FLASH: the firmware image will NOT be flashed\n");
575 void
576 rtas_restart(char *cmd)
578 if (rtas_firmware_flash_list.next)
579 rtas_flash_firmware();
581 printk("RTAS system-reboot returned %d\n",
582 rtas_call(rtas_token("system-reboot"), 0, 1, NULL));
583 for (;;);
586 void
587 rtas_power_off(void)
589 if (rtas_firmware_flash_list.next)
590 rtas_flash_bypass_warning();
591 /* allow power on only with power button press */
592 printk("RTAS power-off returned %d\n",
593 rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1));
594 for (;;);
597 void
598 rtas_halt(void)
600 if (rtas_firmware_flash_list.next)
601 rtas_flash_bypass_warning();
602 rtas_power_off();
605 /* Must be in the RMO region, so we place it here */
606 static char rtas_os_term_buf[2048];
608 void rtas_os_term(char *str)
610 int status;
612 if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term"))
613 return;
615 snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str);
617 do {
618 status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL,
619 __pa(rtas_os_term_buf));
621 if (status == RTAS_BUSY)
622 udelay(1);
623 else if (status != 0)
624 printk(KERN_EMERG "ibm,os-term call failed %d\n",
625 status);
626 } while (status == RTAS_BUSY);
630 asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
632 struct rtas_args args;
633 unsigned long flags;
634 char * buff_copy;
635 int nargs;
636 int err_rc = 0;
638 if (!capable(CAP_SYS_ADMIN))
639 return -EPERM;
641 if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
642 return -EFAULT;
644 nargs = args.nargs;
645 if (nargs > ARRAY_SIZE(args.args)
646 || args.nret > ARRAY_SIZE(args.args)
647 || nargs + args.nret > ARRAY_SIZE(args.args))
648 return -EINVAL;
650 /* Copy in args. */
651 if (copy_from_user(args.args, uargs->args,
652 nargs * sizeof(rtas_arg_t)) != 0)
653 return -EFAULT;
655 buff_copy = kmalloc(RTAS_ERROR_LOG_MAX, GFP_KERNEL);
657 spin_lock_irqsave(&rtas.lock, flags);
659 rtas.args = args;
660 enter_rtas(__pa(&rtas.args));
661 args = rtas.args;
663 args.rets = &args.args[nargs];
665 /* A -1 return code indicates that the last command couldn't
666 be completed due to a hardware error. */
667 if (args.rets[0] == -1) {
668 err_rc = __fetch_rtas_last_error();
669 if ((err_rc == 0) && buff_copy) {
670 memcpy(buff_copy, rtas_err_buf, RTAS_ERROR_LOG_MAX);
674 spin_unlock_irqrestore(&rtas.lock, flags);
676 if (buff_copy) {
677 if ((args.rets[0] == -1) && (err_rc == 0)) {
678 log_error(buff_copy, ERR_TYPE_RTAS_LOG, 0);
680 kfree(buff_copy);
683 /* Copy out args. */
684 if (copy_to_user(uargs->args + nargs,
685 args.args + nargs,
686 args.nret * sizeof(rtas_arg_t)) != 0)
687 return -EFAULT;
689 return 0;
692 /* This version can't take the spinlock, because it never returns */
694 struct rtas_args rtas_stop_self_args = {
695 /* The token is initialized for real in setup_system() */
696 .token = RTAS_UNKNOWN_SERVICE,
697 .nargs = 0,
698 .nret = 1,
699 .rets = &rtas_stop_self_args.args[0],
702 void rtas_stop_self(void)
704 struct rtas_args *rtas_args = &rtas_stop_self_args;
706 local_irq_disable();
708 BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE);
710 printk("cpu %u (hwid %u) Ready to die...\n",
711 smp_processor_id(), hard_smp_processor_id());
712 enter_rtas(__pa(rtas_args));
714 panic("Alas, I survived.\n");
718 * Call early during boot, before mem init or bootmem, to retreive the RTAS
719 * informations from the device-tree and allocate the RMO buffer for userland
720 * accesses.
722 void __init rtas_initialize(void)
724 /* Get RTAS dev node and fill up our "rtas" structure with infos
725 * about it.
727 rtas.dev = of_find_node_by_name(NULL, "rtas");
728 if (rtas.dev) {
729 u32 *basep, *entryp;
730 u32 *sizep;
732 basep = (u32 *)get_property(rtas.dev, "linux,rtas-base", NULL);
733 sizep = (u32 *)get_property(rtas.dev, "rtas-size", NULL);
734 if (basep != NULL && sizep != NULL) {
735 rtas.base = *basep;
736 rtas.size = *sizep;
737 entryp = (u32 *)get_property(rtas.dev, "linux,rtas-entry", NULL);
738 if (entryp == NULL) /* Ugh */
739 rtas.entry = rtas.base;
740 else
741 rtas.entry = *entryp;
742 } else
743 rtas.dev = NULL;
745 /* If RTAS was found, allocate the RMO buffer for it and look for
746 * the stop-self token if any
748 if (rtas.dev) {
749 unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
750 if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
751 rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);
753 rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE,
754 rtas_region);
756 #ifdef CONFIG_HOTPLUG_CPU
757 rtas_stop_self_args.token = rtas_token("stop-self");
758 #endif /* CONFIG_HOTPLUG_CPU */
764 EXPORT_SYMBOL(rtas_firmware_flash_list);
765 EXPORT_SYMBOL(rtas_token);
766 EXPORT_SYMBOL(rtas_call);
767 EXPORT_SYMBOL(rtas_data_buf);
768 EXPORT_SYMBOL(rtas_data_buf_lock);
769 EXPORT_SYMBOL(rtas_extended_busy_delay_time);
770 EXPORT_SYMBOL(rtas_get_sensor);
771 EXPORT_SYMBOL(rtas_get_power_level);
772 EXPORT_SYMBOL(rtas_set_power_level);
773 EXPORT_SYMBOL(rtas_set_indicator);
774 EXPORT_SYMBOL(rtas_get_error_log_max);