mirror of
https://github.com/torvalds/linux.git
synced 2026-04-20 07:43:57 -04:00
We plan to use several workers where we might be running long operations. Allocate dedicated workqueue to avoid undesired interaction with non-virtualized workers. Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://lore.kernel.org/r/20240104222031.277-2-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SRIOV_H_
|
|
#define _XE_SRIOV_H_
|
|
|
|
#include "xe_assert.h"
|
|
#include "xe_device_types.h"
|
|
#include "xe_sriov_types.h"
|
|
|
|
const char *xe_sriov_mode_to_string(enum xe_sriov_mode mode);
|
|
|
|
void xe_sriov_probe_early(struct xe_device *xe, bool has_sriov);
|
|
int xe_sriov_init(struct xe_device *xe);
|
|
|
|
static inline enum xe_sriov_mode xe_device_sriov_mode(struct xe_device *xe)
|
|
{
|
|
xe_assert(xe, xe->sriov.__mode);
|
|
return xe->sriov.__mode;
|
|
}
|
|
|
|
static inline bool xe_device_is_sriov_pf(struct xe_device *xe)
|
|
{
|
|
return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_PF;
|
|
}
|
|
|
|
static inline bool xe_device_is_sriov_vf(struct xe_device *xe)
|
|
{
|
|
return xe_device_sriov_mode(xe) == XE_SRIOV_MODE_VF;
|
|
}
|
|
|
|
#ifdef CONFIG_PCI_IOV
|
|
#define IS_SRIOV_PF(xe) xe_device_is_sriov_pf(xe)
|
|
#else
|
|
#define IS_SRIOV_PF(xe) (typecheck(struct xe_device *, (xe)) && false)
|
|
#endif
|
|
#define IS_SRIOV_VF(xe) xe_device_is_sriov_vf(xe)
|
|
|
|
#define IS_SRIOV(xe) (IS_SRIOV_PF(xe) || IS_SRIOV_VF(xe))
|
|
|
|
#endif
|