drivers/platform/x86/intel/pmt/discovery-kunit.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel/pmt/discovery-kunit.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel/pmt/discovery-kunit.c- Extension
.c- Size
- 3696 bytes
- Lines
- 117
- Domain
- Driver Families
- Bucket
- drivers/platform
- 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
kunit/test.hlinux/err.hlinux/intel_pmt_features.hlinux/intel_vsec.hlinux/module.hlinux/slab.h
Detected Declarations
function Copyrightfunction linebreakfunction test_intel_pmt_get_regions_by_feature
Annotated Snippet
if (IS_ERR(feature_group)) {
if (PTR_ERR(feature_group) == -ENOENT)
kunit_warn(test, "intel_pmt_get_regions_by_feature() reporting feature %d [%s] is not present.\n",
feature_id, name);
else
kunit_warn(test, "intel_pmt_get_regions_by_feature() returned error %ld while attempt to lookup %d [%s].\n",
PTR_ERR(feature_group), feature_id, name);
continue;
}
if (!feature_group) {
kunit_warn(test, "Feature ID %d: %s is not available.\n", feature_id, name);
continue;
}
num_available++;
validate_pmt_regions(test, feature_group, feature_id);
intel_pmt_put_feature_group(feature_group);
}
if (num_available == 0)
kunit_warn(test, "No PMT region groups were available for any feature ID (0-10).\n");
}
static struct kunit_case intel_pmt_discovery_test_cases[] = {
KUNIT_CASE(test_intel_pmt_get_regions_by_feature),
{}
};
static struct kunit_suite intel_pmt_discovery_test_suite = {
.name = "pmt_discovery_test",
.test_cases = intel_pmt_discovery_test_cases,
};
kunit_test_suite(intel_pmt_discovery_test_suite);
MODULE_IMPORT_NS("INTEL_PMT_DISCOVERY");
MODULE_AUTHOR("David E. Box <david.e.box@linux.intel.com>");
MODULE_DESCRIPTION("Intel PMT Discovery KUNIT test driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `kunit/test.h`, `linux/err.h`, `linux/intel_pmt_features.h`, `linux/intel_vsec.h`, `linux/module.h`, `linux/slab.h`.
- Detected declarations: `function Copyright`, `function linebreak`, `function test_intel_pmt_get_regions_by_feature`.
- Atlas domain: Driver Families / drivers/platform.
- 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.