|
| 1 | +/* |
| 2 | + * Copyright 2012 Tilera Corporation. All Rights Reserved. |
| 3 | + * |
| 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. |
| 7 | + * |
| 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 |
| 12 | + * more details. |
| 13 | + */ |
| 14 | + |
| 15 | +/* This file is machine-generated; DO NOT EDIT! */ |
| 16 | +#include "gxio/iorpc_globals.h" |
| 17 | + |
| 18 | +struct arm_pollfd_param { |
| 19 | + union iorpc_pollfd pollfd; |
| 20 | +}; |
| 21 | + |
| 22 | +int __iorpc_arm_pollfd(int fd, int pollfd_cookie) |
| 23 | +{ |
| 24 | + struct arm_pollfd_param temp; |
| 25 | + struct arm_pollfd_param *params = &temp; |
| 26 | + |
| 27 | + params->pollfd.kernel.cookie = pollfd_cookie; |
| 28 | + |
| 29 | + return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), |
| 30 | + IORPC_OP_ARM_POLLFD); |
| 31 | +} |
| 32 | + |
| 33 | +EXPORT_SYMBOL(__iorpc_arm_pollfd); |
| 34 | + |
| 35 | +struct close_pollfd_param { |
| 36 | + union iorpc_pollfd pollfd; |
| 37 | +}; |
| 38 | + |
| 39 | +int __iorpc_close_pollfd(int fd, int pollfd_cookie) |
| 40 | +{ |
| 41 | + struct close_pollfd_param temp; |
| 42 | + struct close_pollfd_param *params = &temp; |
| 43 | + |
| 44 | + params->pollfd.kernel.cookie = pollfd_cookie; |
| 45 | + |
| 46 | + return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), |
| 47 | + IORPC_OP_CLOSE_POLLFD); |
| 48 | +} |
| 49 | + |
| 50 | +EXPORT_SYMBOL(__iorpc_close_pollfd); |
| 51 | + |
| 52 | +struct get_mmio_base_param { |
| 53 | + HV_PTE base; |
| 54 | +}; |
| 55 | + |
| 56 | +int __iorpc_get_mmio_base(int fd, HV_PTE *base) |
| 57 | +{ |
| 58 | + int __result; |
| 59 | + struct get_mmio_base_param temp; |
| 60 | + struct get_mmio_base_param *params = &temp; |
| 61 | + |
| 62 | + __result = |
| 63 | + hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params), |
| 64 | + IORPC_OP_GET_MMIO_BASE); |
| 65 | + *base = params->base; |
| 66 | + |
| 67 | + return __result; |
| 68 | +} |
| 69 | + |
| 70 | +EXPORT_SYMBOL(__iorpc_get_mmio_base); |
| 71 | + |
| 72 | +struct check_mmio_offset_param { |
| 73 | + unsigned long offset; |
| 74 | + unsigned long size; |
| 75 | +}; |
| 76 | + |
| 77 | +int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size) |
| 78 | +{ |
| 79 | + struct check_mmio_offset_param temp; |
| 80 | + struct check_mmio_offset_param *params = &temp; |
| 81 | + |
| 82 | + params->offset = offset; |
| 83 | + params->size = size; |
| 84 | + |
| 85 | + return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params), |
| 86 | + IORPC_OP_CHECK_MMIO_OFFSET); |
| 87 | +} |
| 88 | + |
| 89 | +EXPORT_SYMBOL(__iorpc_check_mmio_offset); |
0 commit comments