drivers/iommu/generic_pt/fmt/iommu_template.h

Source file repositories/reference/linux-study-clean/drivers/iommu/generic_pt/fmt/iommu_template.h

File Facts

System
Linux kernel
Corpus path
drivers/iommu/generic_pt/fmt/iommu_template.h
Extension
.h
Size
1206 bytes
Lines
49
Domain
Driver Families
Bucket
drivers/iommu
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/args.h>
#include <linux/stringify.h>

#ifdef PT_FMT_VARIANT
#define PTPFX_RAW \
	CONCATENATE(CONCATENATE(PT_FMT, _), PT_FMT_VARIANT)
#else
#define PTPFX_RAW PT_FMT
#endif

#define PTPFX CONCATENATE(PTPFX_RAW, _)

#define _PT_FMT_H PT_FMT.h
#define PT_FMT_H __stringify(_PT_FMT_H)

#define _PT_DEFS_H CONCATENATE(defs_, _PT_FMT_H)
#define PT_DEFS_H __stringify(_PT_DEFS_H)

#include <linux/generic_pt/common.h>
#include PT_DEFS_H
#include "../pt_defs.h"
#include PT_FMT_H
#include "../pt_common.h"

#ifndef GENERIC_PT_KUNIT
#include "../iommu_pt.h"
#else
/*
 * The makefile will compile the .c file twice, once with GENERIC_PT_KUNIT set
 * which means we are building the kunit modle.
 */
#include "../kunit_generic_pt.h"
#include "../kunit_iommu_pt.h"
#endif

Annotation

Implementation Notes