brintos

brintos / linux-shallow public Read only

0
0
Text · 1.0 KiB · 0bf12d8 Raw
36 lines · c
1/* SPDX-License-Identifier: MIT */2/*3 * Copyright © 2023-2024 Intel Corporation4 */5 6#ifndef _XE_GT_SRIOV_PF_HELPERS_H_7#define _XE_GT_SRIOV_PF_HELPERS_H_8 9#include "xe_gt_types.h"10#include "xe_sriov_pf_helpers.h"11 12/**13 * xe_gt_sriov_pf_assert_vfid() - warn if &id is not a supported VF number when debugging.14 * @gt: the PF &xe_gt to assert on15 * @vfid: the VF number to assert16 *17 * Assert that &gt belongs to the Physical Function (PF) device and provided &vfid18 * is within a range of supported VF numbers (up to maximum number of VFs that19 * driver can support, including VF0 that represents the PF itself).20 *21 * Note: Effective only on debug builds. See `Xe ASSERTs`_ for more information.22 */23#define xe_gt_sriov_pf_assert_vfid(gt, vfid)	xe_sriov_pf_assert_vfid(gt_to_xe(gt), (vfid))24 25static inline int xe_gt_sriov_pf_get_totalvfs(struct xe_gt *gt)26{27	return xe_sriov_pf_get_totalvfs(gt_to_xe(gt));28}29 30static inline struct mutex *xe_gt_sriov_pf_master_mutex(struct xe_gt *gt)31{32	return xe_sriov_pf_master_mutex(gt_to_xe(gt));33}34 35#endif36