drivers/dma/idxd/defaults.c
Source file repositories/reference/linux-study-clean/drivers/dma/idxd/defaults.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/idxd/defaults.c- Extension
.c- Size
- 1086 bytes
- Lines
- 52
- Domain
- Driver Families
- Bucket
- drivers/dma
- 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
linux/kernel.hidxd.h
Detected Declarations
function idxd_load_iaa_device_defaults
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2023 Intel Corporation. All rights rsvd. */
#include <linux/kernel.h>
#include "idxd.h"
int idxd_load_iaa_device_defaults(struct idxd_device *idxd)
{
struct idxd_engine *engine;
struct idxd_group *group;
struct idxd_wq *wq;
if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags))
return 0;
wq = idxd->wqs[0];
if (wq->state != IDXD_WQ_DISABLED)
return -EPERM;
/* set mode to "dedicated" */
set_bit(WQ_FLAG_DEDICATED, &wq->flags);
wq->threshold = 0;
/* only setting up 1 wq, so give it all the wq space */
wq->size = idxd->max_wq_size;
/* set priority to 10 */
wq->priority = 10;
/* set type to "kernel" */
wq->type = IDXD_WQT_KERNEL;
/* set wq group to 0 */
group = idxd->groups[0];
wq->group = group;
group->num_wqs++;
/* set name to "iaa_crypto" */
strscpy_pad(wq->name, "iaa_crypto");
/* set driver_name to "crypto" */
strscpy_pad(wq->driver_name, "crypto");
engine = idxd->engines[0];
/* set engine group to 0 */
engine->group = idxd->groups[0];
engine->group->num_engines++;
return 0;
}
Annotation
- Immediate include surface: `linux/kernel.h`, `idxd.h`.
- Detected declarations: `function idxd_load_iaa_device_defaults`.
- Atlas domain: Driver Families / drivers/dma.
- 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.