drivers/mtd/sm_ftl.c
Source file repositories/reference/linux-study-clean/drivers/mtd/sm_ftl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/sm_ftl.c- Extension
.c- Size
- 30434 bytes
- Lines
- 1289
- 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.
- 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/kernel.hlinux/module.hlinux/random.hlinux/hdreg.hlinux/kthread.hlinux/freezer.hlinux/sysfs.hlinux/bitops.hlinux/slab.hlinux/mtd/nand-ecc-sw-hamming.hnand/raw/sm_common.hsm_ftl.h
Detected Declarations
struct sm_sysfs_attributefunction sm_attr_showfunction sm_delete_sysfs_attributesfunction sm_get_lbafunction sm_read_lbafunction sm_write_lbafunction sm_mkoffsetfunction sm_break_offsetfunction sm_correct_sectorfunction sm_read_sectorfunction sm_write_sectorfunction sm_write_blockfunction sm_mark_block_badfunction sm_erase_blockfunction sm_check_blockfunction sm_get_media_infofunction sm_read_cisfunction sm_find_cisfunction sm_recheck_mediafunction sm_init_zonefunction sm_cache_initfunction sm_cache_putfunction sm_cache_getfunction sm_cache_flushfunction sm_cache_flush_timerfunction sm_cache_flush_workfunction sm_readfunction sm_writefunction sm_flushfunction sm_releasefunction sm_getgeofunction sm_add_mtdfunction sm_remove_devfunction sm_module_initfunction sm_module_exitmodule init sm_module_init
Annotated Snippet
module_init(sm_module_init);
module_exit(sm_module_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Maxim Levitsky <maximlevitsky@gmail.com>");
MODULE_DESCRIPTION("Smartmedia/xD mtd translation layer");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/random.h`, `linux/hdreg.h`, `linux/kthread.h`, `linux/freezer.h`, `linux/sysfs.h`, `linux/bitops.h`.
- Detected declarations: `struct sm_sysfs_attribute`, `function sm_attr_show`, `function sm_delete_sysfs_attributes`, `function sm_get_lba`, `function sm_read_lba`, `function sm_write_lba`, `function sm_mkoffset`, `function sm_break_offset`, `function sm_correct_sector`, `function sm_read_sector`.
- Atlas domain: Driver Families / drivers/mtd.
- 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.