blob: 69561bc3ec10f49dd587e82ba04814b1d9b36f07 [file] [log] [blame]
Carl van Schaik2f4ca292018-06-12 01:46:33 +10001/*
2 * User-visible interface to driver for inter-cell links using the
3 * shared-buffer transport.
4 *
5 * Copyright (c) 2016 Cog Systems Pty Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 *
12 */
13#ifndef _LINUX_OKL4_LINK_SHBUF_H
14#define _LINUX_OKL4_LINK_SHBUF_H
15
16#include <linux/ioctl.h>
17#include <linux/types.h>
18
19/*
20 * Ioctl that indicates a request to raise the outgoing vIRQ. This value is
21 * chosen to avoid conflict with the numbers documented in Linux 4.1's
22 * ioctl-numbers.txt. The argument is a payload to transmit to the receiver.
23 * Note that consecutive transmissions without an interleaved clear of the
24 * interrupt results in the payloads being ORed together.
25 */
26#define OKL4_LINK_SHBUF_IOCTL_IRQ_TX _IOW(0x8d, 1, __u64)
27
28/*
29 * Ioctl that indicates a request to clear any pending incoming vIRQ. The value
30 * returned through the argument to the ioctl is the payload, which is also
31 * cleared.
32 *
33 * The caller cannot distinguish between the cases of no pending interrupt and
34 * a pending interrupt with payload 0. It is expected that the caller is
35 * communicating with a cooperative sender and has polled their file descriptor
36 * to determine there is a pending interrupt before using this ioctl.
37 */
38#define OKL4_LINK_SHBUF_IOCTL_IRQ_CLR _IOR(0x8d, 2, __u64)
39
40#endif /* _LINUX_OKL4_LINK_SHBUF_H */