tools/testing/cxl/test/cxl.c
Source file repositories/reference/linux-study-clean/tools/testing/cxl/test/cxl.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/cxl/test/cxl.c- Extension
.c- Size
- 52327 bytes
- Lines
- 2058
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/platform_device.hlinux/memory_hotplug.hlinux/genalloc.hlinux/module.hlinux/mutex.hlinux/acpi.hlinux/pci.hlinux/mm.hcxlmem.h../watermark.hmock.h
Detected Declarations
struct cxl_mock_resstruct cxl_cedt_contextstruct target_map_ctxstruct cxl_test_decoderfunction is_multi_bridgefunction is_single_bridgefunction is_mock_devfunction is_mock_adevfunction depopulate_all_mock_resourcesfunction cfmws_elc_updatefunction populate_cedtfunction mock_acpi_table_parse_cedtfunction is_mock_bridgefunction is_mock_portfunction host_bridge_indexfunction mock_acpi_evaluate_integerfunction mock_hmat_get_extended_linear_cache_sizefunction is_mock_busfunction map_targetsfunction idfunction cxld_copyfunction cxld_registry_restorefunction __cxld_registry_savefunction cxld_registry_savefunction cxld_registry_updatefunction mock_decoder_commitfunction mock_decoder_resetfunction init_disabled_mock_decoderfunction default_mock_decoderfunction first_decoderfunction configurationfunction mock_cxl_enumerate_decodersfunction __mock_cxl_decoders_setupfunction mock_cxl_switch_port_decoders_setupfunction mock_cxl_endpoint_decoders_setupfunction get_port_arrayfunction dpa_perf_setupfunction mock_cxl_endpoint_parse_cdatfunction mock_walk_hmem_resourcesfunction mock_region_intersectsfunction mock_region_intersects_soft_reservefunction mock_companionfunction cxl_mock_platform_device_addfunction cxl_rch_topo_initfunction cxl_rch_topo_exitfunction cxl_single_topo_initfunction cxl_single_topo_exitfunction cxl_mem_exit
Annotated Snippet
module_init(cxl_test_init);
module_exit(cxl_test_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("cxl_test: setup module");
MODULE_IMPORT_NS("ACPI");
MODULE_IMPORT_NS("CXL");
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/memory_hotplug.h`, `linux/genalloc.h`, `linux/module.h`, `linux/mutex.h`, `linux/acpi.h`, `linux/pci.h`, `linux/mm.h`.
- Detected declarations: `struct cxl_mock_res`, `struct cxl_cedt_context`, `struct target_map_ctx`, `struct cxl_test_decoder`, `function is_multi_bridge`, `function is_single_bridge`, `function is_mock_dev`, `function is_mock_adev`, `function depopulate_all_mock_resources`, `function cfmws_elc_update`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.