drivers/mtd/mtdoops.c
Source file repositories/reference/linux-study-clean/drivers/mtd/mtdoops.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/mtdoops.c- Extension
.c- Size
- 11507 bytes
- Lines
- 456
- Domain
- Driver Families
- Bucket
- drivers/mtd
- 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.
- 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/kernel.hlinux/module.hlinux/console.hlinux/vmalloc.hlinux/workqueue.hlinux/sched.hlinux/wait.hlinux/delay.hlinux/interrupt.hlinux/timekeeping.hlinux/mtd/mtd.hlinux/kmsg_dump.h
Detected Declarations
struct mtdoops_hdrfunction mark_page_usedfunction mark_page_unusedfunction page_is_usedfunction mtdoops_erase_blockfunction mtdoops_erasefunction mtdoops_workfunc_erasefunction mtdoops_inc_counterfunction mtdoops_writefunction mtdoops_workfunc_writefunction find_next_positionfunction mtdoops_do_dumpfunction mtdoops_notify_addfunction mtdoops_notify_removefunction mtdoops_initfunction mtdoops_exitmodule init mtdoops_init
Annotated Snippet
module_init(mtdoops_init);
module_exit(mtdoops_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
MODULE_DESCRIPTION("MTD Oops/Panic console logger/driver");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/console.h`, `linux/vmalloc.h`, `linux/workqueue.h`, `linux/sched.h`, `linux/wait.h`, `linux/delay.h`.
- Detected declarations: `struct mtdoops_hdr`, `function mark_page_used`, `function mark_page_unused`, `function page_is_used`, `function mtdoops_erase_block`, `function mtdoops_erase`, `function mtdoops_workfunc_erase`, `function mtdoops_inc_counter`, `function mtdoops_write`, `function mtdoops_workfunc_write`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: integration 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.