1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright �� 2023 Intel Corporation 4 */ 5 6#ifndef _XE_GUC_RELAY_H_ 7#define _XE_GUC_RELAY_H_ 8 9#include <linux/types.h> 10#include <linux/errno.h> 11 12struct xe_guc_relay; 13 14int xe_guc_relay_init(struct xe_guc_relay *relay); 15 16int xe_guc_relay_send_to_pf(struct xe_guc_relay *relay, 17 const u32 *msg, u32 len, u32 *buf, u32 buf_size); 18 19int xe_guc_relay_process_guc2vf(struct xe_guc_relay *relay, const u32 *msg, u32 len); 20 21#ifdef CONFIG_PCI_IOV 22int xe_guc_relay_send_to_vf(struct xe_guc_relay *relay, u32 target, 23 const u32 *msg, u32 len, u32 *buf, u32 buf_size); 24int xe_guc_relay_process_guc2pf(struct xe_guc_relay *relay, const u32 *msg, u32 len); 25#else 26static inline int xe_guc_relay_send_to_vf(struct xe_guc_relay *relay, u32 target, 27 const u32 *msg, u32 len, u32 *buf, u32 buf_size) 28{ 29 return -ENODEV; 30} 31static inline int xe_guc_relay_process_guc2pf(struct xe_guc_relay *relay, const u32 *msg, u32 len) 32{ 33 return -ENODEV; 34} 35#endif 36 37#endif 38