]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - drivers/staging/unisys/visorchannel/visorchannel.h
staging: unisys: remove U8 type
[mirror_ubuntu-zesty-kernel.git] / drivers / staging / unisys / visorchannel / visorchannel.h
CommitLineData
e423812a
KC
1/* visorchannel.h
2 *
f6d0c1e6 3 * Copyright (C) 2010 - 2013 UNISYS CORPORATION
e423812a
KC
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * details.
16 */
17
18#ifndef __VISORCHANNEL_H__
19#define __VISORCHANNEL_H__
20
90addb02
BR
21#include <linux/uuid.h>
22
e423812a
KC
23#include "commontypes.h"
24#include "memregion.h"
25#include "channel.h"
26#ifndef HOSTADDRESS
27#define HOSTADDRESS U64
28#endif
29#ifndef BOOL
30#define BOOL int
31#endif
32
33/* VISORCHANNEL is an opaque structure to users.
34 * Fields are declared only in the implementation .c files.
35 */
36typedef struct VISORCHANNEL_Tag VISORCHANNEL;
37
38/* Note that for visorchannel_create() and visorchannel_create_overlapped(),
39 * <channelBytes> and <guid> arguments may be 0 if we are a channel CLIENT.
40 * In this case, the values can simply be read from the channel header.
41 */
42VISORCHANNEL *visorchannel_create(HOSTADDRESS physaddr,
90addb02 43 ulong channelBytes, uuid_le guid);
e423812a
KC
44VISORCHANNEL *visorchannel_create_overlapped(ulong channelBytes,
45 VISORCHANNEL *parent, ulong off,
90addb02 46 uuid_le guid);
e423812a 47VISORCHANNEL *visorchannel_create_with_lock(HOSTADDRESS physaddr,
90addb02 48 ulong channelBytes, uuid_le guid);
e423812a
KC
49VISORCHANNEL *visorchannel_create_overlapped_with_lock(ulong channelBytes,
50 VISORCHANNEL *parent,
90addb02 51 ulong off, uuid_le guid);
e423812a
KC
52void visorchannel_destroy(VISORCHANNEL *channel);
53int visorchannel_read(VISORCHANNEL *channel, ulong offset,
54 void *local, ulong nbytes);
55int visorchannel_write(VISORCHANNEL *channel, ulong offset,
56 void *local, ulong nbytes);
57int visorchannel_clear(VISORCHANNEL *channel, ulong offset,
c242233e 58 u8 ch, ulong nbytes);
e423812a
KC
59BOOL visorchannel_signalremove(VISORCHANNEL *channel, U32 queue, void *msg);
60BOOL visorchannel_signalinsert(VISORCHANNEL *channel, U32 queue, void *msg);
61int visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, U32 queue);
62int visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, U32 queue);
63
64HOSTADDRESS visorchannel_get_physaddr(VISORCHANNEL *channel);
65ulong visorchannel_get_nbytes(VISORCHANNEL *channel);
66char *visorchannel_id(VISORCHANNEL *channel, char *s);
67char *visorchannel_zoneid(VISORCHANNEL *channel, char *s);
68U64 visorchannel_get_clientpartition(VISORCHANNEL *channel);
90addb02 69uuid_le visorchannel_get_uuid(VISORCHANNEL *channel);
e423812a 70MEMREGION *visorchannel_get_memregion(VISORCHANNEL *channel);
90addb02 71char *visorchannel_uuid_id(uuid_le *guid, char *s);
e423812a
KC
72void visorchannel_debug(VISORCHANNEL *channel, int nQueues,
73 struct seq_file *seq, U32 off);
74void visorchannel_dump_section(VISORCHANNEL *chan, char *s,
75 int off, int len, struct seq_file *seq);
3db5540d 76void __iomem *visorchannel_get_header(VISORCHANNEL *channel);
e423812a 77
e423812a 78#endif