arch/xtensa/platforms/iss/simdisk.c
Source file repositories/reference/linux-study-clean/arch/xtensa/platforms/iss/simdisk.c
File Facts
- System
- Linux kernel
- Corpus path
arch/xtensa/platforms/iss/simdisk.c- Extension
.c- Size
- 8319 bytes
- Lines
- 377
- Domain
- Architecture Layer
- Bucket
- arch/xtensa
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- 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/module.hlinux/moduleparam.hlinux/kernel.hlinux/init.hlinux/string.hlinux/string_choices.hlinux/blkdev.hlinux/bio.hlinux/proc_fs.hlinux/uaccess.hplatform/simcall.h
Detected Declarations
struct simdiskfunction simdisk_param_set_filenamefunction simdisk_transferfunction simdisk_submit_biofunction bio_for_each_segmentfunction simdisk_openfunction simdisk_releasefunction simdisk_attachfunction simdisk_detachfunction proc_read_simdiskfunction proc_write_simdiskfunction simdisk_setupfunction simdisk_initfunction simdisk_teardownfunction simdisk_exitmodule init simdisk_init
Annotated Snippet
module_init(simdisk_init);
static void simdisk_teardown(struct simdisk *dev, int which,
struct proc_dir_entry *procdir)
{
char tmp[2] = { '0' + which, 0 };
simdisk_detach(dev);
if (dev->gd) {
del_gendisk(dev->gd);
put_disk(dev->gd);
}
remove_proc_entry(tmp, procdir);
}
static void __exit simdisk_exit(void)
{
int i;
for (i = 0; i < simdisk_count; ++i)
simdisk_teardown(sddev + i, i, simdisk_procdir);
remove_proc_entry("simdisk", 0);
kfree(sddev);
unregister_blkdev(simdisk_major, "simdisk");
}
module_exit(simdisk_exit);
MODULE_ALIAS_BLOCKDEV_MAJOR(SIMDISK_MAJOR);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/init.h`, `linux/string.h`, `linux/string_choices.h`, `linux/blkdev.h`, `linux/bio.h`.
- Detected declarations: `struct simdisk`, `function simdisk_param_set_filename`, `function simdisk_transfer`, `function simdisk_submit_bio`, `function bio_for_each_segment`, `function simdisk_open`, `function simdisk_release`, `function simdisk_attach`, `function simdisk_detach`, `function proc_read_simdisk`.
- Atlas domain: Architecture Layer / arch/xtensa.
- 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.