Benign repos Download

xe_gt_sriov_vf.c

Source contains low-bit mask syntaxAssigns a negative errno constant
SHA-256b4416a402d93d2f9b4d68014a84f8c215b0550df47341d920f48bafac3e762cf

Evidence

imports abi/guc_actions_sriov_abi.h lines 1–47
1// SPDX-License-Identifier: MIT
2/*
3 * Copyright © 2023-2024 Intel Corporation
4 */
5
6#include <linux/bitfield.h>
7#include <linux/bsearch.h>
8#include <linux/delay.h>
9
10#include <drm/drm_managed.h>
11#include <drm/drm_print.h>
12
13#include "abi/guc_actions_sriov_abi.h"
14#include "abi/guc_communication_mmio_abi.h"
15#include "abi/guc_klvs_abi.h"
16#include "abi/guc_relay_actions_abi.h"
17#include "regs/xe_gt_regs.h"
18
19#include "xe_assert.h"
20#include "xe_device.h"
21#include "xe_ggtt.h"
22#include "xe_gt_sriov_printk.h"
23#include "xe_gt_sriov_vf.h"
24#include "xe_gt_sriov_vf_types.h"
25#include "xe_guc.h"
26#include "xe_guc_ct.h"
27#include "xe_guc_hxg_helpers.h"
28#include "xe_guc_relay.h"
29#include "xe_guc_submit.h"
30#include "xe_irq.h"
31#include "xe_lrc.h"
32#include "xe_memirq.h"
33#include "xe_mmio.h"
34#include "xe_sriov.h"
35#include "xe_sriov_vf.h"
36#include "xe_sriov_vf_ccs.h"
37#include "xe_tile_sriov_vf.h"
38#include "xe_tlb_inval.h"
39#include "xe_uc_fw.h"
40#include "xe_wopcm.h"
41
42#define make_u64_from_u32(hi, lo) ((u64)((u64)(u32)(hi) << 32 | (u32)(lo)))
⋯5 lines
Kernel error code return lines 115–124
115:26… struct xe_gt *gt)
116{
117 if (!xe_device_uc_enabled(gt_to_xe(gt)))
118 return -ENODEV;
119
120 return vf_reset_guc_state(gt);
⋯4 lines
Assigns a negative errno constant lines 231–255
231:7… wanted.branch, wanted.major,
232 wanted.minor, wanted.patch);
233 err = -EREMCHG;
234 goto fail;
235 } else {
⋯5 lines
241 /* illegal */
242 if (guc_version->major > wanted.major) {
243 err = -EPROTO;
244 goto unsupported;
245 }
246
247 /* there's no fallback on major version. */
248 if (guc_version->major != wanted.major) {
249 err = -ENOPKG;
250 goto unsupported;
251 }
⋯4 lines
C declares a character or byte buffer lines 543–551
543:13… ile *tile = gt_to_tile(gt);
544 struct xe_guc *guc = &gt->uc.guc;
545 char size_str[10];
546 u64 size, lmem_size;
547 int err;
⋯4 lines
Source contains low-bit mask syntax lines 631–641
631:8… _PTR(err));
632 return err;
633 }
634
635 /* valid values are 0 (disabled) and 1 (enabled) */
636 if (value > 1) {
637 xe_gt_sriov_err(gt, "Invalid sched groups status %u\n", value);
⋯4 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.