KVM: Introduce gfn_to_hva_memslot_prot
[linux/fpc-iii.git] / arch / tile / gxio / iorpc_mpipe_info.c
blob77019c6e9b4ab1178cafff23e6b33a9780934545
1 /*
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
12 * more details.
15 /* This file is machine-generated; DO NOT EDIT! */
16 #include "gxio/iorpc_mpipe_info.h"
18 struct instance_aux_param {
19 _gxio_mpipe_link_name_t name;
22 int gxio_mpipe_info_instance_aux(gxio_mpipe_info_context_t *context,
23 _gxio_mpipe_link_name_t name)
25 struct instance_aux_param temp;
26 struct instance_aux_param *params = &temp;
28 params->name = name;
30 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
31 sizeof(*params), GXIO_MPIPE_INFO_OP_INSTANCE_AUX);
34 EXPORT_SYMBOL(gxio_mpipe_info_instance_aux);
36 struct enumerate_aux_param {
37 _gxio_mpipe_link_name_t name;
38 _gxio_mpipe_link_mac_t mac;
41 int gxio_mpipe_info_enumerate_aux(gxio_mpipe_info_context_t *context,
42 unsigned int idx,
43 _gxio_mpipe_link_name_t *name,
44 _gxio_mpipe_link_mac_t *mac)
46 int __result;
47 struct enumerate_aux_param temp;
48 struct enumerate_aux_param *params = &temp;
50 __result =
51 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
52 (((uint64_t)idx << 32) |
53 GXIO_MPIPE_INFO_OP_ENUMERATE_AUX));
54 *name = params->name;
55 *mac = params->mac;
57 return __result;
60 EXPORT_SYMBOL(gxio_mpipe_info_enumerate_aux);
62 struct get_mmio_base_param {
63 HV_PTE base;
66 int gxio_mpipe_info_get_mmio_base(gxio_mpipe_info_context_t *context,
67 HV_PTE *base)
69 int __result;
70 struct get_mmio_base_param temp;
71 struct get_mmio_base_param *params = &temp;
73 __result =
74 hv_dev_pread(context->fd, 0, (HV_VirtAddr) params, sizeof(*params),
75 GXIO_MPIPE_INFO_OP_GET_MMIO_BASE);
76 *base = params->base;
78 return __result;
81 EXPORT_SYMBOL(gxio_mpipe_info_get_mmio_base);
83 struct check_mmio_offset_param {
84 unsigned long offset;
85 unsigned long size;
88 int gxio_mpipe_info_check_mmio_offset(gxio_mpipe_info_context_t *context,
89 unsigned long offset, unsigned long size)
91 struct check_mmio_offset_param temp;
92 struct check_mmio_offset_param *params = &temp;
94 params->offset = offset;
95 params->size = size;
97 return hv_dev_pwrite(context->fd, 0, (HV_VirtAddr) params,
98 sizeof(*params),
99 GXIO_MPIPE_INFO_OP_CHECK_MMIO_OFFSET);
102 EXPORT_SYMBOL(gxio_mpipe_info_check_mmio_offset);