File: xe_gt_sriov_pf_helpers.h

package info (click to toggle)
linux 6.17.7-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,734,408 kB
  • sloc: ansic: 26,679,265; asm: 271,207; sh: 147,319; python: 75,916; makefile: 57,295; perl: 36,942; xml: 19,562; cpp: 5,899; yacc: 4,909; lex: 2,943; awk: 1,556; sed: 29; ruby: 25
file content (35 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2023-2024 Intel Corporation
 */

#ifndef _XE_GT_SRIOV_PF_HELPERS_H_
#define _XE_GT_SRIOV_PF_HELPERS_H_

#include "xe_gt_types.h"
#include "xe_sriov_pf_helpers.h"

/**
 * xe_gt_sriov_pf_assert_vfid() - warn if &id is not a supported VF number when debugging.
 * @gt: the PF &xe_gt to assert on
 * @vfid: the VF number to assert
 *
 * Assert that &gt belongs to the Physical Function (PF) device and provided &vfid
 * is within a range of supported VF numbers (up to maximum number of VFs that
 * driver can support, including VF0 that represents the PF itself).
 *
 * Note: Effective only on debug builds. See `Xe Asserts`_ for more information.
 */
#define xe_gt_sriov_pf_assert_vfid(gt, vfid)	xe_sriov_pf_assert_vfid(gt_to_xe(gt), (vfid))

static inline int xe_gt_sriov_pf_get_totalvfs(struct xe_gt *gt)
{
	return xe_sriov_pf_get_totalvfs(gt_to_xe(gt));
}

static inline struct mutex *xe_gt_sriov_pf_master_mutex(struct xe_gt *gt)
{
	return xe_sriov_pf_master_mutex(gt_to_xe(gt));
}

#endif