GNU Linux-libre 4.14.251-gnu1
[releases.git] / drivers / staging / unisys / visorbus / visorbus_private.h
1 /*
2  * Copyright (C) 2010 - 2015 UNISYS CORPORATION
3  * All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12  * NON INFRINGEMENT.  See the GNU General Public License for more
13  * details.
14  */
15
16 #ifndef __VISORBUS_PRIVATE_H__
17 #define __VISORBUS_PRIVATE_H__
18
19 #include <linux/uuid.h>
20 #include <linux/utsname.h>
21
22 #include "controlvmchannel.h"
23 #include "vbuschannel.h"
24 #include "visorbus.h"
25
26 int visorbus_create_instance(struct visor_device *dev);
27 void visorbus_remove_instance(struct visor_device *bus_info);
28 int create_visor_device(struct visor_device *dev_info);
29 void remove_visor_device(struct visor_device *dev_info);
30 int visorchipset_device_pause(struct visor_device *dev_info);
31 int visorchipset_device_resume(struct visor_device *dev_info);
32
33 void visorbus_response(struct visor_device *p, int response, int controlvm_id);
34 void visorbus_device_changestate_response(struct visor_device *p, int response,
35                                           struct visor_segment_state state);
36
37 int visorbus_init(void);
38 void visorbus_exit(void);
39
40 /* visorchannel access functions */
41 struct visorchannel *visorchannel_create(u64 physaddr, gfp_t gfp,
42                                          const guid_t *guid);
43 struct visorchannel *visorchannel_create_with_lock(u64 physaddr, gfp_t gfp,
44                                                    const guid_t *guid);
45 void visorchannel_destroy(struct visorchannel *channel);
46 int visorchannel_read(struct visorchannel *channel, ulong offset,
47                       void *dest, ulong nbytes);
48 int visorchannel_write(struct visorchannel *channel, ulong offset,
49                        void *dest, ulong nbytes);
50 u64 visorchannel_get_physaddr(struct visorchannel *channel);
51 ulong visorchannel_get_nbytes(struct visorchannel *channel);
52 char *visorchannel_id(struct visorchannel *channel, char *s);
53 char *visorchannel_zoneid(struct visorchannel *channel, char *s);
54 u64 visorchannel_get_clientpartition(struct visorchannel *channel);
55 int visorchannel_set_clientpartition(struct visorchannel *channel,
56                                      u64 partition_handle);
57 char *visorchannel_guid_id(const guid_t *guid, char *s);
58 void *visorchannel_get_header(struct visorchannel *channel);
59 #endif