drivers/misc/sram.h
Source file repositories/reference/linux-study-clean/drivers/misc/sram.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/sram.h- Extension
.h- Size
- 1200 bytes
- Lines
- 64
- Domain
- Driver Families
- Bucket
- drivers/misc
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct sram_configstruct sram_partitionstruct sram_devstruct sram_reservefunction sram_check_protect_execfunction sram_add_protect_exec
Annotated Snippet
struct sram_config {
int (*init)(void);
bool map_only_reserved;
};
struct sram_partition {
void __iomem *base;
struct gen_pool *pool;
struct bin_attribute battr;
struct mutex lock;
struct list_head list;
};
struct sram_dev {
const struct sram_config *config;
struct device *dev;
void __iomem *virt_base;
bool no_memory_wc;
struct gen_pool *pool;
struct sram_partition *partition;
u32 partitions;
};
struct sram_reserve {
struct list_head list;
u32 start;
u32 size;
struct resource res;
bool export;
bool pool;
bool protect_exec;
const char *label;
};
#ifdef CONFIG_SRAM_EXEC
int sram_check_protect_exec(struct sram_dev *sram, struct sram_reserve *block,
struct sram_partition *part);
int sram_add_protect_exec(struct sram_partition *part);
#else
static inline int sram_check_protect_exec(struct sram_dev *sram,
struct sram_reserve *block,
struct sram_partition *part)
{
return -ENODEV;
}
static inline int sram_add_protect_exec(struct sram_partition *part)
{
return -ENODEV;
}
#endif /* CONFIG_SRAM_EXEC */
#endif /* __SRAM_H */
Annotation
- Detected declarations: `struct sram_config`, `struct sram_partition`, `struct sram_dev`, `struct sram_reserve`, `function sram_check_protect_exec`, `function sram_add_protect_exec`.
- Atlas domain: Driver Families / drivers/misc.
- Implementation status: source 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.