drivers/gpu/drm/xe/xe_sriov_pf_control.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_sriov_pf_control.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_sriov_pf_control.c- Extension
.c- Size
- 6436 bytes
- Lines
- 304
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
xe_device.hxe_gt_sriov_pf_control.hxe_gt_sriov_pf_migration.hxe_sriov_packet.hxe_sriov_pf_control.hxe_sriov_printk.h
Detected Declarations
function xe_sriov_pf_control_pause_vffunction for_each_gtfunction xe_sriov_pf_control_resume_vffunction for_each_gtfunction xe_sriov_pf_control_stop_vffunction for_each_gtfunction xe_sriov_pf_control_reset_vffunction for_each_gtfunction for_each_gtfunction xe_sriov_pf_control_prepare_flrfunction for_each_gtfunction xe_sriov_pf_control_wait_flrfunction for_each_gtfunction xe_sriov_pf_control_sync_flrfunction for_each_gtfunction xe_sriov_pf_control_trigger_save_vffunction for_each_gtfunction xe_sriov_pf_control_finish_save_vffunction for_each_gtfunction xe_sriov_pf_control_trigger_restore_vffunction for_each_gtfunction xe_sriov_pf_control_finish_restore_vffunction for_each_gt
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2025 Intel Corporation
*/
#include "xe_device.h"
#include "xe_gt_sriov_pf_control.h"
#include "xe_gt_sriov_pf_migration.h"
#include "xe_sriov_packet.h"
#include "xe_sriov_pf_control.h"
#include "xe_sriov_printk.h"
/**
* xe_sriov_pf_control_pause_vf() - Pause a VF on all GTs.
* @xe: the &xe_device
* @vfid: the VF identifier (can't be 0 == PFID)
*
* This function is for PF only.
*
* Return: 0 on success or a negative error code on failure.
*/
int xe_sriov_pf_control_pause_vf(struct xe_device *xe, unsigned int vfid)
{
struct xe_gt *gt;
unsigned int id;
int result = 0;
int err;
for_each_gt(gt, xe, id) {
err = xe_gt_sriov_pf_control_pause_vf(gt, vfid);
result = result ? -EUCLEAN : err;
}
if (result)
return result;
xe_sriov_info(xe, "VF%u paused!\n", vfid);
return 0;
}
/**
* xe_sriov_pf_control_resume_vf() - Resume a VF on all GTs.
* @xe: the &xe_device
* @vfid: the VF identifier
*
* This function is for PF only.
*
* Return: 0 on success or a negative error code on failure.
*/
int xe_sriov_pf_control_resume_vf(struct xe_device *xe, unsigned int vfid)
{
struct xe_gt *gt;
unsigned int id;
int result = 0;
int err;
for_each_gt(gt, xe, id) {
err = xe_gt_sriov_pf_control_resume_vf(gt, vfid);
result = result ? -EUCLEAN : err;
}
if (result)
return result;
xe_sriov_info(xe, "VF%u resumed!\n", vfid);
return 0;
}
/**
* xe_sriov_pf_control_stop_vf - Stop a VF on all GTs.
* @xe: the &xe_device
* @vfid: the VF identifier
*
* This function is for PF only.
*
* Return: 0 on success or a negative error code on failure.
*/
int xe_sriov_pf_control_stop_vf(struct xe_device *xe, unsigned int vfid)
{
struct xe_gt *gt;
unsigned int id;
int result = 0;
int err;
for_each_gt(gt, xe, id) {
err = xe_gt_sriov_pf_control_stop_vf(gt, vfid);
result = result ? -EUCLEAN : err;
}
if (result)
Annotation
- Immediate include surface: `xe_device.h`, `xe_gt_sriov_pf_control.h`, `xe_gt_sriov_pf_migration.h`, `xe_sriov_packet.h`, `xe_sriov_pf_control.h`, `xe_sriov_printk.h`.
- Detected declarations: `function xe_sriov_pf_control_pause_vf`, `function for_each_gt`, `function xe_sriov_pf_control_resume_vf`, `function for_each_gt`, `function xe_sriov_pf_control_stop_vf`, `function for_each_gt`, `function xe_sriov_pf_control_reset_vf`, `function for_each_gt`, `function for_each_gt`, `function xe_sriov_pf_control_prepare_flr`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.