// SPDX-License-Identifier: GPL-2.0-only
/*
* Intel MIC Platform Software Stack (MPSS)
*
* Copyright(c) 2014 Intel Corporation.
*
* Intel SCIF driver.
*/
#include <linux/scif.h>
#include "scif_main.h"
#include "scif_map.h"
static const char * const scif_ep_states[] = {
"Unbound",
"Bound",
"Listening",
"Connected",
"Connecting",
"Mapping",
"Closing",
"Close Listening",
"Disconnected",
"Zombie"};
enum conn_async_state {
ASYNC_CONN_IDLE = 1, /* ep setup for async connect */
ASYNC_CONN_INPROGRESS, /* async connect in progress */
ASYNC_CONN_FLUSH_WORK /* async work flush in progress */
};
/*
* File operations for anonymous inode file associated with a SCIF endpoint,
* used in kernel mode SCIF poll. Kernel mode SCIF poll calls portions of the
* poll API in the kernel and these take in a struct file *. Since a struct
* file is not available to kernel mode SCIF, it uses an anonymous file for
* this purpose.
*/
const struct file_operations scif_anon_fops = {
.owner = THIS_MODULE,
};
scif_epd_t scif_open(void)
{
struct scif_endpt *ep;
int err;
might_sleep