1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright �� 2023 Intel Corporation
4 */
5
6#ifndef _XE_GUC_RELAY_TYPES_H_
7#define _XE_GUC_RELAY_TYPES_H_
8
9#include <linux/mempool.h>
10#include <linux/spinlock.h>
11#include <linux/workqueue.h>
12
13/**
14 * struct xe_guc_relay - Data used by the VF-PF Relay Communication over GuC.
15 */
16struct xe_guc_relay {
17	/**@lock: protects all internal data. */
18	spinlock_t lock;
19
20	/** @worker: dispatches incoming action messages. */
21	struct work_struct worker;
22
23	/** @pending_relays: list of sent requests that await a response. */
24	struct list_head pending_relays;
25
26	/** @incoming_actions: list of incoming relay action messages to process. */
27	struct list_head incoming_actions;
28
29	/** @pool: pool of the relay message buffers. */
30	mempool_t pool;
31
32	/** @last_rid: last Relay-ID used while sending a message. */
33	u32 last_rid;
34};
35
36#endif
37