drivers/net/netconsole.c
Source file repositories/reference/linux-study-clean/drivers/net/netconsole.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/netconsole.c- Extension
.c- Size
- 66230 bytes
- Lines
- 2498
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/mm.hlinux/init.hlinux/module.hlinux/slab.hlinux/console.hlinux/moduleparam.hlinux/kernel.hlinux/string.hlinux/ip.hlinux/ipv6.hlinux/udp.hlinux/netpoll.hlinux/inet.hlinux/unaligned.hnet/ip6_checksum.hlinux/configfs.hlinux/etherdevice.hlinux/hex.hlinux/u64_stats_sync.hlinux/utsname.hlinux/rtnetlink.hlinux/workqueue.h
Detected Declarations
struct netconsole_target_statsstruct netconsole_targetstruct userdatumstruct userdataenum console_typeenum sysdata_featureenum target_statefunction option_setupfunction dynamic_netconsole_initfunction dynamic_netconsole_exitfunction hierarchyfunction netconsole_target_putfunction dynamic_netconsole_mutex_lockfunction dynamic_netconsole_mutex_unlockfunction dynamic_netconsole_initfunction dynamic_netconsole_exitfunction netcons_release_devfunction resume_targetfunction deactivated_target_matchfunction process_resume_targetfunction netconsole_process_cleanups_corefunction netconsole_print_bannerfunction netpoll_parse_ip_addrfunction netconsole_process_cleanupsfunction trim_newlinefunction enabled_showfunction extended_showfunction release_showfunction dev_name_showfunction local_port_showfunction remote_port_showfunction local_ip_showfunction remote_ip_showfunction local_mac_showfunction remote_mac_showfunction transmit_errors_showfunction sysdata_cpu_nr_enabled_showfunction sysdata_taskname_enabled_showfunction sysdata_release_enabled_showfunction unregister_netcons_consolesfunction sysdata_msgid_enabled_showfunction enabledfunction release_storefunction extended_storefunction dev_name_storefunction local_port_storefunction remote_port_storefunction local_ip_store
Annotated Snippet
* late_initcall() and module_init() are identical if built as module.
*/
late_initcall(init_netconsole);
module_exit(cleanup_netconsole);
Annotation
- Immediate include surface: `linux/mm.h`, `linux/init.h`, `linux/module.h`, `linux/slab.h`, `linux/console.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/string.h`.
- Detected declarations: `struct netconsole_target_stats`, `struct netconsole_target`, `struct userdatum`, `struct userdata`, `enum console_type`, `enum sysdata_feature`, `enum target_state`, `function option_setup`, `function dynamic_netconsole_init`, `function dynamic_netconsole_exit`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.