Back to home page

LXR

 
 

    


0001 /*
0002  * Copyright 2012 Tilera Corporation. All Rights Reserved.
0003  *
0004  *   This program is free software; you can redistribute it and/or
0005  *   modify it under the terms of the GNU General Public License
0006  *   as published by the Free Software Foundation, version 2.
0007  *
0008  *   This program is distributed in the hope that it will be useful, but
0009  *   WITHOUT ANY WARRANTY; without even the implied warranty of
0010  *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
0011  *   NON INFRINGEMENT.  See the GNU General Public License for
0012  *   more details.
0013  */
0014 
0015 /* This file is machine-generated; DO NOT EDIT! */
0016 #include "gxio/iorpc_globals.h"
0017 
0018 struct arm_pollfd_param {
0019     union iorpc_pollfd pollfd;
0020 };
0021 
0022 int __iorpc_arm_pollfd(int fd, int pollfd_cookie)
0023 {
0024     struct arm_pollfd_param temp;
0025     struct arm_pollfd_param *params = &temp;
0026 
0027     params->pollfd.kernel.cookie = pollfd_cookie;
0028 
0029     return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
0030                  IORPC_OP_ARM_POLLFD);
0031 }
0032 
0033 EXPORT_SYMBOL(__iorpc_arm_pollfd);
0034 
0035 struct close_pollfd_param {
0036     union iorpc_pollfd pollfd;
0037 };
0038 
0039 int __iorpc_close_pollfd(int fd, int pollfd_cookie)
0040 {
0041     struct close_pollfd_param temp;
0042     struct close_pollfd_param *params = &temp;
0043 
0044     params->pollfd.kernel.cookie = pollfd_cookie;
0045 
0046     return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
0047                  IORPC_OP_CLOSE_POLLFD);
0048 }
0049 
0050 EXPORT_SYMBOL(__iorpc_close_pollfd);
0051 
0052 struct get_mmio_base_param {
0053     HV_PTE base;
0054 };
0055 
0056 int __iorpc_get_mmio_base(int fd, HV_PTE *base)
0057 {
0058     int __result;
0059     struct get_mmio_base_param temp;
0060     struct get_mmio_base_param *params = &temp;
0061 
0062     __result =
0063         hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params),
0064              IORPC_OP_GET_MMIO_BASE);
0065     *base = params->base;
0066 
0067     return __result;
0068 }
0069 
0070 EXPORT_SYMBOL(__iorpc_get_mmio_base);
0071 
0072 struct check_mmio_offset_param {
0073     unsigned long offset;
0074     unsigned long size;
0075 };
0076 
0077 int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size)
0078 {
0079     struct check_mmio_offset_param temp;
0080     struct check_mmio_offset_param *params = &temp;
0081 
0082     params->offset = offset;
0083     params->size = size;
0084 
0085     return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
0086                  IORPC_OP_CHECK_MMIO_OFFSET);
0087 }
0088 
0089 EXPORT_SYMBOL(__iorpc_check_mmio_offset);