Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / drivers / staging / tidspbridge / rmgr / disp.c
bloba9aa22f3b4f6e1ba7c3a989a59888c5e59a7cdce
1 /*
2 * disp.c
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Node Dispatcher interface. Communicates with Resource Manager Server
7 * (RMS) on DSP. Access to RMS is synchronized in NODE.
9 * Copyright (C) 2005-2006 Texas Instruments, Inc.
11 * This package is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #include <linux/types.h>
21 /* ----------------------------------- Host OS */
22 #include <dspbridge/host_os.h>
24 /* ----------------------------------- DSP/BIOS Bridge */
25 #include <dspbridge/dbdefs.h>
27 /* ----------------------------------- Trace & Debug */
28 #include <dspbridge/dbc.h>
30 /* ----------------------------------- OS Adaptation Layer */
31 #include <dspbridge/sync.h>
33 /* ----------------------------------- Link Driver */
34 #include <dspbridge/dspdefs.h>
36 /* ----------------------------------- Platform Manager */
37 #include <dspbridge/dev.h>
38 #include <dspbridge/chnldefs.h>
40 /* ----------------------------------- Resource Manager */
41 #include <dspbridge/nodedefs.h>
42 #include <dspbridge/nodepriv.h>
43 #include <dspbridge/rms_sh.h>
45 /* ----------------------------------- This */
46 #include <dspbridge/disp.h>
48 /* Size of a reply from RMS */
49 #define REPLYSIZE (3 * sizeof(rms_word))
51 /* Reserved channel offsets for communication with RMS */
52 #define CHNLTORMSOFFSET 0
53 #define CHNLFROMRMSOFFSET 1
55 #define CHNLIOREQS 1
58 * ======== disp_object ========
60 struct disp_object {
61 struct dev_object *dev_obj; /* Device for this processor */
62 /* Function interface to Bridge driver */
63 struct bridge_drv_interface *intf_fxns;
64 struct chnl_mgr *chnl_mgr; /* Channel manager */
65 struct chnl_object *chnl_to_dsp; /* Chnl for commands to RMS */
66 struct chnl_object *chnl_from_dsp; /* Chnl for replies from RMS */
67 u8 *buf; /* Buffer for commands, replies */
68 u32 bufsize; /* buf size in bytes */
69 u32 bufsize_rms; /* buf size in RMS words */
70 u32 char_size; /* Size of DSP character */
71 u32 word_size; /* Size of DSP word */
72 u32 data_mau_size; /* Size of DSP Data MAU */
75 static u32 refs;
77 static void delete_disp(struct disp_object *disp_obj);
78 static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset,
79 struct node_strmdef strm_def, u32 max,
80 u32 chars_in_rms_word);
81 static int send_message(struct disp_object *disp_obj, u32 timeout,
82 u32 ul_bytes, u32 *pdw_arg);
85 * ======== disp_create ========
86 * Create a NODE Dispatcher object.
88 int disp_create(struct disp_object **dispatch_obj,
89 struct dev_object *hdev_obj,
90 const struct disp_attr *disp_attrs)
92 struct disp_object *disp_obj;
93 struct bridge_drv_interface *intf_fxns;
94 u32 ul_chnl_id;
95 struct chnl_attr chnl_attr_obj;
96 int status = 0;
97 u8 dev_type;
99 DBC_REQUIRE(refs > 0);
100 DBC_REQUIRE(dispatch_obj != NULL);
101 DBC_REQUIRE(disp_attrs != NULL);
102 DBC_REQUIRE(hdev_obj != NULL);
104 *dispatch_obj = NULL;
106 /* Allocate Node Dispatcher object */
107 disp_obj = kzalloc(sizeof(struct disp_object), GFP_KERNEL);
108 if (disp_obj == NULL)
109 status = -ENOMEM;
110 else
111 disp_obj->dev_obj = hdev_obj;
113 /* Get Channel manager and Bridge function interface */
114 if (!status) {
115 status = dev_get_chnl_mgr(hdev_obj, &(disp_obj->chnl_mgr));
116 if (!status) {
117 (void)dev_get_intf_fxns(hdev_obj, &intf_fxns);
118 disp_obj->intf_fxns = intf_fxns;
122 /* check device type and decide if streams or messag'ing is used for
123 * RMS/EDS */
124 if (status)
125 goto func_cont;
127 status = dev_get_dev_type(hdev_obj, &dev_type);
129 if (status)
130 goto func_cont;
132 if (dev_type != DSP_UNIT) {
133 status = -EPERM;
134 goto func_cont;
137 disp_obj->char_size = DSPWORDSIZE;
138 disp_obj->word_size = DSPWORDSIZE;
139 disp_obj->data_mau_size = DSPWORDSIZE;
140 /* Open channels for communicating with the RMS */
141 chnl_attr_obj.uio_reqs = CHNLIOREQS;
142 chnl_attr_obj.event_obj = NULL;
143 ul_chnl_id = disp_attrs->chnl_offset + CHNLTORMSOFFSET;
144 status = (*intf_fxns->chnl_open) (&(disp_obj->chnl_to_dsp),
145 disp_obj->chnl_mgr,
146 CHNL_MODETODSP, ul_chnl_id,
147 &chnl_attr_obj);
149 if (!status) {
150 ul_chnl_id = disp_attrs->chnl_offset + CHNLFROMRMSOFFSET;
151 status =
152 (*intf_fxns->chnl_open) (&(disp_obj->chnl_from_dsp),
153 disp_obj->chnl_mgr,
154 CHNL_MODEFROMDSP, ul_chnl_id,
155 &chnl_attr_obj);
157 if (!status) {
158 /* Allocate buffer for commands, replies */
159 disp_obj->bufsize = disp_attrs->chnl_buf_size;
160 disp_obj->bufsize_rms = RMS_COMMANDBUFSIZE;
161 disp_obj->buf = kzalloc(disp_obj->bufsize, GFP_KERNEL);
162 if (disp_obj->buf == NULL)
163 status = -ENOMEM;
165 func_cont:
166 if (!status)
167 *dispatch_obj = disp_obj;
168 else
169 delete_disp(disp_obj);
171 DBC_ENSURE((status && *dispatch_obj == NULL) ||
172 (!status && *dispatch_obj));
173 return status;
177 * ======== disp_delete ========
178 * Delete the NODE Dispatcher.
180 void disp_delete(struct disp_object *disp_obj)
182 DBC_REQUIRE(refs > 0);
183 DBC_REQUIRE(disp_obj);
185 delete_disp(disp_obj);
189 * ======== disp_exit ========
190 * Discontinue usage of DISP module.
192 void disp_exit(void)
194 DBC_REQUIRE(refs > 0);
196 refs--;
198 DBC_ENSURE(refs >= 0);
202 * ======== disp_init ========
203 * Initialize the DISP module.
205 bool disp_init(void)
207 bool ret = true;
209 DBC_REQUIRE(refs >= 0);
211 if (ret)
212 refs++;
214 DBC_ENSURE((ret && (refs > 0)) || (!ret && (refs >= 0)));
215 return ret;
219 * ======== disp_node_change_priority ========
220 * Change the priority of a node currently running on the target.
222 int disp_node_change_priority(struct disp_object *disp_obj,
223 struct node_object *hnode,
224 u32 rms_fxn, nodeenv node_env, s32 prio)
226 u32 dw_arg;
227 struct rms_command *rms_cmd;
228 int status = 0;
230 DBC_REQUIRE(refs > 0);
231 DBC_REQUIRE(disp_obj);
232 DBC_REQUIRE(hnode != NULL);
234 /* Send message to RMS to change priority */
235 rms_cmd = (struct rms_command *)(disp_obj->buf);
236 rms_cmd->fxn = (rms_word) (rms_fxn);
237 rms_cmd->arg1 = (rms_word) node_env;
238 rms_cmd->arg2 = prio;
239 status = send_message(disp_obj, node_get_timeout(hnode),
240 sizeof(struct rms_command), &dw_arg);
242 return status;
246 * ======== disp_node_create ========
247 * Create a node on the DSP by remotely calling the node's create function.
249 int disp_node_create(struct disp_object *disp_obj,
250 struct node_object *hnode, u32 rms_fxn,
251 u32 ul_create_fxn,
252 const struct node_createargs *pargs,
253 nodeenv *node_env)
255 struct node_msgargs node_msg_args;
256 struct node_taskargs task_arg_obj;
257 struct rms_command *rms_cmd;
258 struct rms_msg_args *pmsg_args;
259 struct rms_more_task_args *more_task_args;
260 enum node_type node_type;
261 u32 dw_length;
262 rms_word *pdw_buf = NULL;
263 u32 ul_bytes;
264 u32 i;
265 u32 total;
266 u32 chars_in_rms_word;
267 s32 task_args_offset;
268 s32 sio_in_def_offset;
269 s32 sio_out_def_offset;
270 s32 sio_defs_offset;
271 s32 args_offset = -1;
272 s32 offset;
273 struct node_strmdef strm_def;
274 u32 max;
275 int status = 0;
276 struct dsp_nodeinfo node_info;
277 u8 dev_type;
279 DBC_REQUIRE(refs > 0);
280 DBC_REQUIRE(disp_obj);
281 DBC_REQUIRE(hnode != NULL);
282 DBC_REQUIRE(node_get_type(hnode) != NODE_DEVICE);
283 DBC_REQUIRE(node_env != NULL);
285 status = dev_get_dev_type(disp_obj->dev_obj, &dev_type);
287 if (status)
288 goto func_end;
290 if (dev_type != DSP_UNIT) {
291 dev_dbg(bridge, "%s: unknown device type = 0x%x\n",
292 __func__, dev_type);
293 goto func_end;
295 DBC_REQUIRE(pargs != NULL);
296 node_type = node_get_type(hnode);
297 node_msg_args = pargs->asa.node_msg_args;
298 max = disp_obj->bufsize_rms; /*Max # of RMS words that can be sent */
299 DBC_ASSERT(max == RMS_COMMANDBUFSIZE);
300 chars_in_rms_word = sizeof(rms_word) / disp_obj->char_size;
301 /* Number of RMS words needed to hold arg data */
302 dw_length =
303 (node_msg_args.arg_length + chars_in_rms_word -
304 1) / chars_in_rms_word;
305 /* Make sure msg args and command fit in buffer */
306 total = sizeof(struct rms_command) / sizeof(rms_word) +
307 sizeof(struct rms_msg_args)
308 / sizeof(rms_word) - 1 + dw_length;
309 if (total >= max) {
310 status = -EPERM;
311 dev_dbg(bridge, "%s: Message args too large for buffer! size "
312 "= %d, max = %d\n", __func__, total, max);
315 * Fill in buffer to send to RMS.
316 * The buffer will have the following format:
318 * RMS command:
319 * Address of RMS_CreateNode()
320 * Address of node's create function
321 * dummy argument
322 * node type
324 * Message Args:
325 * max number of messages
326 * segid for message buffer allocation
327 * notification type to use when message is received
328 * length of message arg data
329 * message args data
331 * Task Args (if task or socket node):
332 * priority
333 * stack size
334 * system stack size
335 * stack segment
336 * misc
337 * number of input streams
338 * pSTRMInDef[] - offsets of STRM definitions for input streams
339 * number of output streams
340 * pSTRMOutDef[] - offsets of STRM definitions for output
341 * streams
342 * STRMInDef[] - array of STRM definitions for input streams
343 * STRMOutDef[] - array of STRM definitions for output streams
345 * Socket Args (if DAIS socket node):
348 if (!status) {
349 total = 0; /* Total number of words in buffer so far */
350 pdw_buf = (rms_word *) disp_obj->buf;
351 rms_cmd = (struct rms_command *)pdw_buf;
352 rms_cmd->fxn = (rms_word) (rms_fxn);
353 rms_cmd->arg1 = (rms_word) (ul_create_fxn);
354 if (node_get_load_type(hnode) == NLDR_DYNAMICLOAD) {
355 /* Flush ICACHE on Load */
356 rms_cmd->arg2 = 1; /* dummy argument */
357 } else {
358 /* Do not flush ICACHE */
359 rms_cmd->arg2 = 0; /* dummy argument */
361 rms_cmd->data = node_get_type(hnode);
363 * args_offset is the offset of the data field in struct
364 * rms_command structure. We need this to calculate stream
365 * definition offsets.
367 args_offset = 3;
368 total += sizeof(struct rms_command) / sizeof(rms_word);
369 /* Message args */
370 pmsg_args = (struct rms_msg_args *)(pdw_buf + total);
371 pmsg_args->max_msgs = node_msg_args.max_msgs;
372 pmsg_args->segid = node_msg_args.seg_id;
373 pmsg_args->notify_type = node_msg_args.notify_type;
374 pmsg_args->arg_length = node_msg_args.arg_length;
375 total += sizeof(struct rms_msg_args) / sizeof(rms_word) - 1;
376 memcpy(pdw_buf + total, node_msg_args.pdata,
377 node_msg_args.arg_length);
378 total += dw_length;
380 if (status)
381 goto func_end;
383 /* If node is a task node, copy task create arguments into buffer */
384 if (node_type == NODE_TASK || node_type == NODE_DAISSOCKET) {
385 task_arg_obj = pargs->asa.task_arg_obj;
386 task_args_offset = total;
387 total += sizeof(struct rms_more_task_args) / sizeof(rms_word) +
388 1 + task_arg_obj.num_inputs + task_arg_obj.num_outputs;
389 /* Copy task arguments */
390 if (total < max) {
391 total = task_args_offset;
392 more_task_args = (struct rms_more_task_args *)(pdw_buf +
393 total);
395 * Get some important info about the node. Note that we
396 * don't just reach into the hnode struct because
397 * that would break the node object's abstraction.
399 get_node_info(hnode, &node_info);
400 more_task_args->priority = node_info.execution_priority;
401 more_task_args->stack_size = task_arg_obj.stack_size;
402 more_task_args->sysstack_size =
403 task_arg_obj.sys_stack_size;
404 more_task_args->stack_seg = task_arg_obj.stack_seg;
405 more_task_args->heap_addr = task_arg_obj.dsp_heap_addr;
406 more_task_args->heap_size = task_arg_obj.heap_size;
407 more_task_args->misc = task_arg_obj.dais_arg;
408 more_task_args->num_input_streams =
409 task_arg_obj.num_inputs;
410 total +=
411 sizeof(struct rms_more_task_args) /
412 sizeof(rms_word);
413 dev_dbg(bridge, "%s: dsp_heap_addr %x, heap_size %x\n",
414 __func__, task_arg_obj.dsp_heap_addr,
415 task_arg_obj.heap_size);
416 /* Keep track of pSIOInDef[] and pSIOOutDef[]
417 * positions in the buffer, since this needs to be
418 * filled in later. */
419 sio_in_def_offset = total;
420 total += task_arg_obj.num_inputs;
421 pdw_buf[total++] = task_arg_obj.num_outputs;
422 sio_out_def_offset = total;
423 total += task_arg_obj.num_outputs;
424 sio_defs_offset = total;
425 /* Fill SIO defs and offsets */
426 offset = sio_defs_offset;
427 for (i = 0; i < task_arg_obj.num_inputs; i++) {
428 if (status)
429 break;
431 pdw_buf[sio_in_def_offset + i] =
432 (offset - args_offset)
433 * (sizeof(rms_word) / DSPWORDSIZE);
434 strm_def = task_arg_obj.strm_in_def[i];
435 status =
436 fill_stream_def(pdw_buf, &total, offset,
437 strm_def, max,
438 chars_in_rms_word);
439 offset = total;
441 for (i = 0; (i < task_arg_obj.num_outputs) &&
442 (!status); i++) {
443 pdw_buf[sio_out_def_offset + i] =
444 (offset - args_offset)
445 * (sizeof(rms_word) / DSPWORDSIZE);
446 strm_def = task_arg_obj.strm_out_def[i];
447 status =
448 fill_stream_def(pdw_buf, &total, offset,
449 strm_def, max,
450 chars_in_rms_word);
451 offset = total;
453 } else {
454 /* Args won't fit */
455 status = -EPERM;
458 if (!status) {
459 ul_bytes = total * sizeof(rms_word);
460 DBC_ASSERT(ul_bytes < (RMS_COMMANDBUFSIZE * sizeof(rms_word)));
461 status = send_message(disp_obj, node_get_timeout(hnode),
462 ul_bytes, node_env);
464 func_end:
465 return status;
469 * ======== disp_node_delete ========
470 * purpose:
471 * Delete a node on the DSP by remotely calling the node's delete function.
474 int disp_node_delete(struct disp_object *disp_obj,
475 struct node_object *hnode, u32 rms_fxn,
476 u32 ul_delete_fxn, nodeenv node_env)
478 u32 dw_arg;
479 struct rms_command *rms_cmd;
480 int status = 0;
481 u8 dev_type;
483 DBC_REQUIRE(refs > 0);
484 DBC_REQUIRE(disp_obj);
485 DBC_REQUIRE(hnode != NULL);
487 status = dev_get_dev_type(disp_obj->dev_obj, &dev_type);
489 if (!status) {
491 if (dev_type == DSP_UNIT) {
494 * Fill in buffer to send to RMS
496 rms_cmd = (struct rms_command *)disp_obj->buf;
497 rms_cmd->fxn = (rms_word) (rms_fxn);
498 rms_cmd->arg1 = (rms_word) node_env;
499 rms_cmd->arg2 = (rms_word) (ul_delete_fxn);
500 rms_cmd->data = node_get_type(hnode);
502 status = send_message(disp_obj, node_get_timeout(hnode),
503 sizeof(struct rms_command),
504 &dw_arg);
507 return status;
511 * ======== disp_node_run ========
512 * purpose:
513 * Start execution of a node's execute phase, or resume execution of a node
514 * that has been suspended (via DISP_NodePause()) on the DSP.
516 int disp_node_run(struct disp_object *disp_obj,
517 struct node_object *hnode, u32 rms_fxn,
518 u32 ul_execute_fxn, nodeenv node_env)
520 u32 dw_arg;
521 struct rms_command *rms_cmd;
522 int status = 0;
523 u8 dev_type;
524 DBC_REQUIRE(refs > 0);
525 DBC_REQUIRE(disp_obj);
526 DBC_REQUIRE(hnode != NULL);
528 status = dev_get_dev_type(disp_obj->dev_obj, &dev_type);
530 if (!status) {
532 if (dev_type == DSP_UNIT) {
535 * Fill in buffer to send to RMS.
537 rms_cmd = (struct rms_command *)disp_obj->buf;
538 rms_cmd->fxn = (rms_word) (rms_fxn);
539 rms_cmd->arg1 = (rms_word) node_env;
540 rms_cmd->arg2 = (rms_word) (ul_execute_fxn);
541 rms_cmd->data = node_get_type(hnode);
543 status = send_message(disp_obj, node_get_timeout(hnode),
544 sizeof(struct rms_command),
545 &dw_arg);
549 return status;
553 * ======== delete_disp ========
554 * purpose:
555 * Frees the resources allocated for the dispatcher.
557 static void delete_disp(struct disp_object *disp_obj)
559 int status = 0;
560 struct bridge_drv_interface *intf_fxns;
562 if (disp_obj) {
563 intf_fxns = disp_obj->intf_fxns;
565 /* Free Node Dispatcher resources */
566 if (disp_obj->chnl_from_dsp) {
567 /* Channel close can fail only if the channel handle
568 * is invalid. */
569 status = (*intf_fxns->chnl_close)
570 (disp_obj->chnl_from_dsp);
571 if (status) {
572 dev_dbg(bridge, "%s: Failed to close channel "
573 "from RMS: 0x%x\n", __func__, status);
576 if (disp_obj->chnl_to_dsp) {
577 status =
578 (*intf_fxns->chnl_close) (disp_obj->
579 chnl_to_dsp);
580 if (status) {
581 dev_dbg(bridge, "%s: Failed to close channel to"
582 " RMS: 0x%x\n", __func__, status);
585 kfree(disp_obj->buf);
587 kfree(disp_obj);
592 * ======== fill_stream_def ========
593 * purpose:
594 * Fills stream definitions.
596 static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset,
597 struct node_strmdef strm_def, u32 max,
598 u32 chars_in_rms_word)
600 struct rms_strm_def *strm_def_obj;
601 u32 total = *ptotal;
602 u32 name_len;
603 u32 dw_length;
604 int status = 0;
606 if (total + sizeof(struct rms_strm_def) / sizeof(rms_word) >= max) {
607 status = -EPERM;
608 } else {
609 strm_def_obj = (struct rms_strm_def *)(pdw_buf + total);
610 strm_def_obj->bufsize = strm_def.buf_size;
611 strm_def_obj->nbufs = strm_def.num_bufs;
612 strm_def_obj->segid = strm_def.seg_id;
613 strm_def_obj->align = strm_def.buf_alignment;
614 strm_def_obj->timeout = strm_def.timeout;
617 if (!status) {
619 * Since we haven't added the device name yet, subtract
620 * 1 from total.
622 total += sizeof(struct rms_strm_def) / sizeof(rms_word) - 1;
623 DBC_REQUIRE(strm_def.sz_device);
624 dw_length = strlen(strm_def.sz_device) + 1;
626 /* Number of RMS_WORDS needed to hold device name */
627 name_len =
628 (dw_length + chars_in_rms_word - 1) / chars_in_rms_word;
630 if (total + name_len >= max) {
631 status = -EPERM;
632 } else {
634 * Zero out last word, since the device name may not
635 * extend to completely fill this word.
637 pdw_buf[total + name_len - 1] = 0;
638 /** TODO USE SERVICES * */
639 memcpy(pdw_buf + total, strm_def.sz_device, dw_length);
640 total += name_len;
641 *ptotal = total;
645 return status;
649 * ======== send_message ======
650 * Send command message to RMS, get reply from RMS.
652 static int send_message(struct disp_object *disp_obj, u32 timeout,
653 u32 ul_bytes, u32 *pdw_arg)
655 struct bridge_drv_interface *intf_fxns;
656 struct chnl_object *chnl_obj;
657 u32 dw_arg = 0;
658 u8 *pbuf;
659 struct chnl_ioc chnl_ioc_obj;
660 int status = 0;
662 DBC_REQUIRE(pdw_arg != NULL);
664 *pdw_arg = (u32) NULL;
665 intf_fxns = disp_obj->intf_fxns;
666 chnl_obj = disp_obj->chnl_to_dsp;
667 pbuf = disp_obj->buf;
669 /* Send the command */
670 status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes, 0,
671 0L, dw_arg);
672 if (status)
673 goto func_end;
675 status =
676 (*intf_fxns->chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);
677 if (!status) {
678 if (!CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
679 if (CHNL_IS_TIMED_OUT(chnl_ioc_obj))
680 status = -ETIME;
681 else
682 status = -EPERM;
685 /* Get the reply */
686 if (status)
687 goto func_end;
689 chnl_obj = disp_obj->chnl_from_dsp;
690 ul_bytes = REPLYSIZE;
691 status = (*intf_fxns->chnl_add_io_req) (chnl_obj, pbuf, ul_bytes,
692 0, 0L, dw_arg);
693 if (status)
694 goto func_end;
696 status =
697 (*intf_fxns->chnl_get_ioc) (chnl_obj, timeout, &chnl_ioc_obj);
698 if (!status) {
699 if (CHNL_IS_TIMED_OUT(chnl_ioc_obj)) {
700 status = -ETIME;
701 } else if (chnl_ioc_obj.byte_size < ul_bytes) {
702 /* Did not get all of the reply from the RMS */
703 status = -EPERM;
704 } else {
705 if (CHNL_IS_IO_COMPLETE(chnl_ioc_obj)) {
706 DBC_ASSERT(chnl_ioc_obj.buf == pbuf);
707 if (*((int *)chnl_ioc_obj.buf) < 0) {
708 /* Translate DSP's to kernel error */
709 status = -EREMOTEIO;
710 dev_dbg(bridge, "%s: DSP-side failed:"
711 " DSP errcode = 0x%x, Kernel "
712 "errcode = %d\n", __func__,
713 *(int *)pbuf, status);
715 *pdw_arg =
716 (((rms_word *) (chnl_ioc_obj.buf))[1]);
717 } else {
718 status = -EPERM;
722 func_end:
723 return status;