2 * Copyright 2012 Tilera Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
15 /* This file is machine-generated; DO NOT EDIT! */
16 #include "gxio/iorpc_mpipe.h"
18 struct alloc_buffer_stacks_param
{
24 int gxio_mpipe_alloc_buffer_stacks(gxio_mpipe_context_t
* context
,
25 unsigned int count
, unsigned int first
,
28 struct alloc_buffer_stacks_param temp
;
29 struct alloc_buffer_stacks_param
*params
= &temp
;
31 params
->count
= count
;
32 params
->first
= first
;
33 params
->flags
= flags
;
35 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
37 GXIO_MPIPE_OP_ALLOC_BUFFER_STACKS
);
40 EXPORT_SYMBOL(gxio_mpipe_alloc_buffer_stacks
);
42 struct init_buffer_stack_aux_param
{
43 union iorpc_mem_buffer buffer
;
45 unsigned int buffer_size_enum
;
48 int gxio_mpipe_init_buffer_stack_aux(gxio_mpipe_context_t
* context
,
49 void *mem_va
, size_t mem_size
,
50 unsigned int mem_flags
, unsigned int stack
,
51 unsigned int buffer_size_enum
)
54 unsigned long long __cpa
;
56 struct init_buffer_stack_aux_param temp
;
57 struct init_buffer_stack_aux_param
*params
= &temp
;
59 __result
= va_to_cpa_and_pte(mem_va
, &__cpa
, &__pte
);
62 params
->buffer
.kernel
.cpa
= __cpa
;
63 params
->buffer
.kernel
.size
= mem_size
;
64 params
->buffer
.kernel
.pte
= __pte
;
65 params
->buffer
.kernel
.flags
= mem_flags
;
66 params
->stack
= stack
;
67 params
->buffer_size_enum
= buffer_size_enum
;
69 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
71 GXIO_MPIPE_OP_INIT_BUFFER_STACK_AUX
);
74 EXPORT_SYMBOL(gxio_mpipe_init_buffer_stack_aux
);
77 struct alloc_notif_rings_param
{
83 int gxio_mpipe_alloc_notif_rings(gxio_mpipe_context_t
* context
,
84 unsigned int count
, unsigned int first
,
87 struct alloc_notif_rings_param temp
;
88 struct alloc_notif_rings_param
*params
= &temp
;
90 params
->count
= count
;
91 params
->first
= first
;
92 params
->flags
= flags
;
94 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
95 sizeof(*params
), GXIO_MPIPE_OP_ALLOC_NOTIF_RINGS
);
98 EXPORT_SYMBOL(gxio_mpipe_alloc_notif_rings
);
100 struct init_notif_ring_aux_param
{
101 union iorpc_mem_buffer buffer
;
105 int gxio_mpipe_init_notif_ring_aux(gxio_mpipe_context_t
* context
, void *mem_va
,
106 size_t mem_size
, unsigned int mem_flags
,
110 unsigned long long __cpa
;
112 struct init_notif_ring_aux_param temp
;
113 struct init_notif_ring_aux_param
*params
= &temp
;
115 __result
= va_to_cpa_and_pte(mem_va
, &__cpa
, &__pte
);
118 params
->buffer
.kernel
.cpa
= __cpa
;
119 params
->buffer
.kernel
.size
= mem_size
;
120 params
->buffer
.kernel
.pte
= __pte
;
121 params
->buffer
.kernel
.flags
= mem_flags
;
124 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
126 GXIO_MPIPE_OP_INIT_NOTIF_RING_AUX
);
129 EXPORT_SYMBOL(gxio_mpipe_init_notif_ring_aux
);
131 struct request_notif_ring_interrupt_param
{
132 union iorpc_interrupt interrupt
;
136 int gxio_mpipe_request_notif_ring_interrupt(gxio_mpipe_context_t
* context
,
137 int inter_x
, int inter_y
,
138 int inter_ipi
, int inter_event
,
141 struct request_notif_ring_interrupt_param temp
;
142 struct request_notif_ring_interrupt_param
*params
= &temp
;
144 params
->interrupt
.kernel
.x
= inter_x
;
145 params
->interrupt
.kernel
.y
= inter_y
;
146 params
->interrupt
.kernel
.ipi
= inter_ipi
;
147 params
->interrupt
.kernel
.event
= inter_event
;
150 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
152 GXIO_MPIPE_OP_REQUEST_NOTIF_RING_INTERRUPT
);
155 EXPORT_SYMBOL(gxio_mpipe_request_notif_ring_interrupt
);
157 struct enable_notif_ring_interrupt_param
{
161 int gxio_mpipe_enable_notif_ring_interrupt(gxio_mpipe_context_t
* context
,
164 struct enable_notif_ring_interrupt_param temp
;
165 struct enable_notif_ring_interrupt_param
*params
= &temp
;
169 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
171 GXIO_MPIPE_OP_ENABLE_NOTIF_RING_INTERRUPT
);
174 EXPORT_SYMBOL(gxio_mpipe_enable_notif_ring_interrupt
);
176 struct alloc_notif_groups_param
{
182 int gxio_mpipe_alloc_notif_groups(gxio_mpipe_context_t
* context
,
183 unsigned int count
, unsigned int first
,
186 struct alloc_notif_groups_param temp
;
187 struct alloc_notif_groups_param
*params
= &temp
;
189 params
->count
= count
;
190 params
->first
= first
;
191 params
->flags
= flags
;
193 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
194 sizeof(*params
), GXIO_MPIPE_OP_ALLOC_NOTIF_GROUPS
);
197 EXPORT_SYMBOL(gxio_mpipe_alloc_notif_groups
);
199 struct init_notif_group_param
{
201 gxio_mpipe_notif_group_bits_t bits
;
204 int gxio_mpipe_init_notif_group(gxio_mpipe_context_t
* context
,
206 gxio_mpipe_notif_group_bits_t bits
)
208 struct init_notif_group_param temp
;
209 struct init_notif_group_param
*params
= &temp
;
211 params
->group
= group
;
214 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
215 sizeof(*params
), GXIO_MPIPE_OP_INIT_NOTIF_GROUP
);
218 EXPORT_SYMBOL(gxio_mpipe_init_notif_group
);
220 struct alloc_buckets_param
{
226 int gxio_mpipe_alloc_buckets(gxio_mpipe_context_t
* context
, unsigned int count
,
227 unsigned int first
, unsigned int flags
)
229 struct alloc_buckets_param temp
;
230 struct alloc_buckets_param
*params
= &temp
;
232 params
->count
= count
;
233 params
->first
= first
;
234 params
->flags
= flags
;
236 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
237 sizeof(*params
), GXIO_MPIPE_OP_ALLOC_BUCKETS
);
240 EXPORT_SYMBOL(gxio_mpipe_alloc_buckets
);
242 struct init_bucket_param
{
244 MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info
;
247 int gxio_mpipe_init_bucket(gxio_mpipe_context_t
* context
, unsigned int bucket
,
248 MPIPE_LBL_INIT_DAT_BSTS_TBL_t bucket_info
)
250 struct init_bucket_param temp
;
251 struct init_bucket_param
*params
= &temp
;
253 params
->bucket
= bucket
;
254 params
->bucket_info
= bucket_info
;
256 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
257 sizeof(*params
), GXIO_MPIPE_OP_INIT_BUCKET
);
260 EXPORT_SYMBOL(gxio_mpipe_init_bucket
);
262 struct alloc_edma_rings_param
{
268 int gxio_mpipe_alloc_edma_rings(gxio_mpipe_context_t
* context
,
269 unsigned int count
, unsigned int first
,
272 struct alloc_edma_rings_param temp
;
273 struct alloc_edma_rings_param
*params
= &temp
;
275 params
->count
= count
;
276 params
->first
= first
;
277 params
->flags
= flags
;
279 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
280 sizeof(*params
), GXIO_MPIPE_OP_ALLOC_EDMA_RINGS
);
283 EXPORT_SYMBOL(gxio_mpipe_alloc_edma_rings
);
285 struct init_edma_ring_aux_param
{
286 union iorpc_mem_buffer buffer
;
288 unsigned int channel
;
291 int gxio_mpipe_init_edma_ring_aux(gxio_mpipe_context_t
* context
, void *mem_va
,
292 size_t mem_size
, unsigned int mem_flags
,
293 unsigned int ring
, unsigned int channel
)
296 unsigned long long __cpa
;
298 struct init_edma_ring_aux_param temp
;
299 struct init_edma_ring_aux_param
*params
= &temp
;
301 __result
= va_to_cpa_and_pte(mem_va
, &__cpa
, &__pte
);
304 params
->buffer
.kernel
.cpa
= __cpa
;
305 params
->buffer
.kernel
.size
= mem_size
;
306 params
->buffer
.kernel
.pte
= __pte
;
307 params
->buffer
.kernel
.flags
= mem_flags
;
309 params
->channel
= channel
;
311 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
312 sizeof(*params
), GXIO_MPIPE_OP_INIT_EDMA_RING_AUX
);
315 EXPORT_SYMBOL(gxio_mpipe_init_edma_ring_aux
);
318 int gxio_mpipe_commit_rules(gxio_mpipe_context_t
* context
, const void *blob
,
321 const void *params
= blob
;
323 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
, blob_size
,
324 GXIO_MPIPE_OP_COMMIT_RULES
);
327 EXPORT_SYMBOL(gxio_mpipe_commit_rules
);
329 struct register_client_memory_param
{
335 int gxio_mpipe_register_client_memory(gxio_mpipe_context_t
* context
,
336 unsigned int iotlb
, HV_PTE pte
,
339 struct register_client_memory_param temp
;
340 struct register_client_memory_param
*params
= &temp
;
342 params
->iotlb
= iotlb
;
344 params
->flags
= flags
;
346 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
348 GXIO_MPIPE_OP_REGISTER_CLIENT_MEMORY
);
351 EXPORT_SYMBOL(gxio_mpipe_register_client_memory
);
353 struct link_open_aux_param
{
354 _gxio_mpipe_link_name_t name
;
358 int gxio_mpipe_link_open_aux(gxio_mpipe_context_t
* context
,
359 _gxio_mpipe_link_name_t name
, unsigned int flags
)
361 struct link_open_aux_param temp
;
362 struct link_open_aux_param
*params
= &temp
;
365 params
->flags
= flags
;
367 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
368 sizeof(*params
), GXIO_MPIPE_OP_LINK_OPEN_AUX
);
371 EXPORT_SYMBOL(gxio_mpipe_link_open_aux
);
373 struct link_close_aux_param
{
377 int gxio_mpipe_link_close_aux(gxio_mpipe_context_t
* context
, int mac
)
379 struct link_close_aux_param temp
;
380 struct link_close_aux_param
*params
= &temp
;
384 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
385 sizeof(*params
), GXIO_MPIPE_OP_LINK_CLOSE_AUX
);
388 EXPORT_SYMBOL(gxio_mpipe_link_close_aux
);
391 struct get_timestamp_aux_param
{
397 int gxio_mpipe_get_timestamp_aux(gxio_mpipe_context_t
* context
, uint64_t * sec
,
398 uint64_t * nsec
, uint64_t * cycles
)
401 struct get_timestamp_aux_param temp
;
402 struct get_timestamp_aux_param
*params
= &temp
;
405 hv_dev_pread(context
->fd
, 0, (HV_VirtAddr
) params
, sizeof(*params
),
406 GXIO_MPIPE_OP_GET_TIMESTAMP_AUX
);
408 *nsec
= params
->nsec
;
409 *cycles
= params
->cycles
;
414 EXPORT_SYMBOL(gxio_mpipe_get_timestamp_aux
);
416 struct set_timestamp_aux_param
{
422 int gxio_mpipe_set_timestamp_aux(gxio_mpipe_context_t
* context
, uint64_t sec
,
423 uint64_t nsec
, uint64_t cycles
)
425 struct set_timestamp_aux_param temp
;
426 struct set_timestamp_aux_param
*params
= &temp
;
430 params
->cycles
= cycles
;
432 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
433 sizeof(*params
), GXIO_MPIPE_OP_SET_TIMESTAMP_AUX
);
436 EXPORT_SYMBOL(gxio_mpipe_set_timestamp_aux
);
438 struct adjust_timestamp_aux_param
{
442 int gxio_mpipe_adjust_timestamp_aux(gxio_mpipe_context_t
* context
,
445 struct adjust_timestamp_aux_param temp
;
446 struct adjust_timestamp_aux_param
*params
= &temp
;
450 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
452 GXIO_MPIPE_OP_ADJUST_TIMESTAMP_AUX
);
455 EXPORT_SYMBOL(gxio_mpipe_adjust_timestamp_aux
);
457 struct arm_pollfd_param
{
458 union iorpc_pollfd pollfd
;
461 int gxio_mpipe_arm_pollfd(gxio_mpipe_context_t
* context
, int pollfd_cookie
)
463 struct arm_pollfd_param temp
;
464 struct arm_pollfd_param
*params
= &temp
;
466 params
->pollfd
.kernel
.cookie
= pollfd_cookie
;
468 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
469 sizeof(*params
), GXIO_MPIPE_OP_ARM_POLLFD
);
472 EXPORT_SYMBOL(gxio_mpipe_arm_pollfd
);
474 struct close_pollfd_param
{
475 union iorpc_pollfd pollfd
;
478 int gxio_mpipe_close_pollfd(gxio_mpipe_context_t
* context
, int pollfd_cookie
)
480 struct close_pollfd_param temp
;
481 struct close_pollfd_param
*params
= &temp
;
483 params
->pollfd
.kernel
.cookie
= pollfd_cookie
;
485 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
486 sizeof(*params
), GXIO_MPIPE_OP_CLOSE_POLLFD
);
489 EXPORT_SYMBOL(gxio_mpipe_close_pollfd
);
491 struct get_mmio_base_param
{
495 int gxio_mpipe_get_mmio_base(gxio_mpipe_context_t
* context
, HV_PTE
*base
)
498 struct get_mmio_base_param temp
;
499 struct get_mmio_base_param
*params
= &temp
;
502 hv_dev_pread(context
->fd
, 0, (HV_VirtAddr
) params
, sizeof(*params
),
503 GXIO_MPIPE_OP_GET_MMIO_BASE
);
504 *base
= params
->base
;
509 EXPORT_SYMBOL(gxio_mpipe_get_mmio_base
);
511 struct check_mmio_offset_param
{
512 unsigned long offset
;
516 int gxio_mpipe_check_mmio_offset(gxio_mpipe_context_t
* context
,
517 unsigned long offset
, unsigned long size
)
519 struct check_mmio_offset_param temp
;
520 struct check_mmio_offset_param
*params
= &temp
;
522 params
->offset
= offset
;
525 return hv_dev_pwrite(context
->fd
, 0, (HV_VirtAddr
) params
,
526 sizeof(*params
), GXIO_MPIPE_OP_CHECK_MMIO_OFFSET
);
529 EXPORT_SYMBOL(gxio_mpipe_check_mmio_offset
);