arch/sh/mm/pmb.c
Source file repositories/reference/linux-study-clean/arch/sh/mm/pmb.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sh/mm/pmb.c- Extension
.c- Size
- 18736 bytes
- Lines
- 892
- Domain
- Architecture Layer
- Bucket
- arch/sh
- 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/init.hlinux/kernel.hlinux/syscore_ops.hlinux/cpu.hlinux/module.hlinux/bitops.hlinux/debugfs.hlinux/fs.hlinux/seq_file.hlinux/err.hlinux/io.hlinux/spinlock.hlinux/vmalloc.hlinux/pgtable.hasm/cacheflush.hlinux/sizes.hlinux/uaccess.hasm/page.hasm/mmu.hasm/mmu_context.h
Detected Declarations
struct pmb_entrystruct pmb_entryfunction mk_pmb_entryfunction mk_pmb_addrfunction mk_pmb_datafunction pmb_ppn_in_rangefunction pmb_cache_flagsfunction pgprot_to_pmb_flagsfunction pmb_can_mergefunction pmb_mapping_existsfunction pmb_size_validfunction pmb_addr_validfunction pmb_prot_validfunction pmb_size_to_flagsfunction pmb_alloc_entryfunction pmb_freefunction __set_pmb_entryfunction __clear_pmb_entryfunction set_pmb_entryfunction pmb_bolt_mappingfunction pmb_unmapfunction __pmb_unmap_entryfunction pmb_unmap_entryfunction pmb_notifyfunction pmb_synchronizefunction pmb_mergefunction pmb_coalescefunction pmb_resizefunction early_pmbfunction pmb_initfunction __in_29bit_modefunction pmb_debugfs_showfunction pmb_debugfs_initfunction pmb_syscore_resumefunction pmb_sysdev_initmodule init pmb_debugfs_initmodule init pmb_sysdev_init
Annotated Snippet
subsys_initcall(pmb_debugfs_init);
#ifdef CONFIG_PM
static void pmb_syscore_resume(void *data)
{
struct pmb_entry *pmbe;
int i;
read_lock(&pmb_rwlock);
for (i = 0; i < ARRAY_SIZE(pmb_entry_list); i++) {
if (test_bit(i, pmb_map)) {
pmbe = &pmb_entry_list[i];
set_pmb_entry(pmbe);
}
}
read_unlock(&pmb_rwlock);
}
static const struct syscore_ops pmb_syscore_ops = {
.resume = pmb_syscore_resume,
};
static struct syscore pmb_syscore = {
.ops = &pmb_syscore_ops,
};
static int __init pmb_sysdev_init(void)
{
register_syscore(&pmb_syscore);
return 0;
}
subsys_initcall(pmb_sysdev_init);
#endif
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/syscore_ops.h`, `linux/cpu.h`, `linux/module.h`, `linux/bitops.h`, `linux/debugfs.h`, `linux/fs.h`.
- Detected declarations: `struct pmb_entry`, `struct pmb_entry`, `function mk_pmb_entry`, `function mk_pmb_addr`, `function mk_pmb_data`, `function pmb_ppn_in_range`, `function pmb_cache_flags`, `function pgprot_to_pmb_flags`, `function pmb_can_merge`, `function pmb_mapping_exists`.
- Atlas domain: Architecture Layer / arch/sh.
- 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.