iorpc_globals.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. /* This file is machine-generated; DO NOT EDIT! */
  15. #include "gxio/iorpc_globals.h"
  16. struct arm_pollfd_param {
  17. union iorpc_pollfd pollfd;
  18. };
  19. int __iorpc_arm_pollfd(int fd, int pollfd_cookie)
  20. {
  21. struct arm_pollfd_param temp;
  22. struct arm_pollfd_param *params = &temp;
  23. params->pollfd.kernel.cookie = pollfd_cookie;
  24. return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
  25. IORPC_OP_ARM_POLLFD);
  26. }
  27. EXPORT_SYMBOL(__iorpc_arm_pollfd);
  28. struct close_pollfd_param {
  29. union iorpc_pollfd pollfd;
  30. };
  31. int __iorpc_close_pollfd(int fd, int pollfd_cookie)
  32. {
  33. struct close_pollfd_param temp;
  34. struct close_pollfd_param *params = &temp;
  35. params->pollfd.kernel.cookie = pollfd_cookie;
  36. return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
  37. IORPC_OP_CLOSE_POLLFD);
  38. }
  39. EXPORT_SYMBOL(__iorpc_close_pollfd);
  40. struct get_mmio_base_param {
  41. HV_PTE base;
  42. };
  43. int __iorpc_get_mmio_base(int fd, HV_PTE *base)
  44. {
  45. int __result;
  46. struct get_mmio_base_param temp;
  47. struct get_mmio_base_param *params = &temp;
  48. __result =
  49. hv_dev_pread(fd, 0, (HV_VirtAddr) params, sizeof(*params),
  50. IORPC_OP_GET_MMIO_BASE);
  51. *base = params->base;
  52. return __result;
  53. }
  54. EXPORT_SYMBOL(__iorpc_get_mmio_base);
  55. struct check_mmio_offset_param {
  56. unsigned long offset;
  57. unsigned long size;
  58. };
  59. int __iorpc_check_mmio_offset(int fd, unsigned long offset, unsigned long size)
  60. {
  61. struct check_mmio_offset_param temp;
  62. struct check_mmio_offset_param *params = &temp;
  63. params->offset = offset;
  64. params->size = size;
  65. return hv_dev_pwrite(fd, 0, (HV_VirtAddr) params, sizeof(*params),
  66. IORPC_OP_CHECK_MMIO_OFFSET);
  67. }
  68. EXPORT_SYMBOL(__iorpc_check_mmio_offset);