mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
drm/xe: Define Virtual Function Identifier
According to the PCI Express specification, the SR-IOV Virtual Functions (VFs) are numbered starting with 1 (VF1, VF2, ...). Additionally, both driver and GuC will refer to Physical Function (PF) as VF0. Define helper macro to represent VFn and PF. Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Link: https://lore.kernel.org/r/20240104222031.277-3-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
This commit is contained in:
parent
0cfb7caefa
commit
b97d87039f
@ -8,6 +8,18 @@
|
||||
|
||||
#include <linux/build_bug.h>
|
||||
|
||||
/**
|
||||
* VFID - Virtual Function Identifier
|
||||
* @n: VF number
|
||||
*
|
||||
* Helper macro to represent Virtual Function (VF) Identifier.
|
||||
* VFID(0) is used as alias to the PFID that represents Physical Function.
|
||||
*
|
||||
* Note: According to PCI spec, SR-IOV VF's numbers are 1-based (VF1, VF2, ...).
|
||||
*/
|
||||
#define VFID(n) (n)
|
||||
#define PFID VFID(0)
|
||||
|
||||
/**
|
||||
* enum xe_sriov_mode - SR-IOV mode
|
||||
* @XE_SRIOV_MODE_NONE: bare-metal mode (non-virtualized)
|
||||
|
Loading…
x
Reference in New Issue
Block a user