arch/arm/mm/pmsa-v7.c
Source file repositories/reference/linux-study-clean/arch/arm/mm/pmsa-v7.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mm/pmsa-v7.c- Extension
.c- Size
- 11633 bytes
- Lines
- 477
- Domain
- Architecture Layer
- Bucket
- arch/arm
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/memblock.hlinux/string.hasm/cacheflush.hasm/cp15.hasm/cputype.hasm/mpu.hasm/sections.hmm.h
Detected Declarations
struct regionfunction rgnr_writefunction dracr_writefunction drsr_writefunction drbar_writefunction drbar_readfunction iracr_writefunction irsr_writefunction irbar_writefunction irbar_readfunction rgnr_writefunction dracr_writefunction drsr_writefunction drbar_writefunction drbar_readfunction iracr_writefunction try_split_regionfunction allocate_regionfunction pmsav7_adjust_lowmem_boundsfunction for_each_mem_rangefunction __mpu_max_regionsfunction mpu_iside_independentfunction __mpu_min_region_orderfunction mpu_setup_regionfunction pmsav7_setup
Annotated Snippet
struct region {
phys_addr_t base;
phys_addr_t size;
unsigned long subreg;
};
static struct region __initdata mem[MPU_MAX_REGIONS];
#ifdef CONFIG_XIP_KERNEL
static struct region __initdata xip[MPU_MAX_REGIONS];
#endif
static unsigned int __initdata mpu_min_region_order;
static unsigned int __initdata mpu_max_regions;
static int __init __mpu_min_region_order(void);
static int __init __mpu_max_regions(void);
#ifndef CONFIG_CPU_V7M
#define DRBAR __ACCESS_CP15(c6, 0, c1, 0)
#define IRBAR __ACCESS_CP15(c6, 0, c1, 1)
#define DRSR __ACCESS_CP15(c6, 0, c1, 2)
#define IRSR __ACCESS_CP15(c6, 0, c1, 3)
#define DRACR __ACCESS_CP15(c6, 0, c1, 4)
#define IRACR __ACCESS_CP15(c6, 0, c1, 5)
#define RNGNR __ACCESS_CP15(c6, 0, c2, 0)
/* Region number */
static inline void rgnr_write(u32 v)
{
write_sysreg(v, RNGNR);
}
/* Data-side / unified region attributes */
/* Region access control register */
static inline void dracr_write(u32 v)
{
write_sysreg(v, DRACR);
}
/* Region size register */
static inline void drsr_write(u32 v)
{
write_sysreg(v, DRSR);
}
/* Region base address register */
static inline void drbar_write(u32 v)
{
write_sysreg(v, DRBAR);
}
static inline u32 drbar_read(void)
{
return read_sysreg(DRBAR);
}
/* Optional instruction-side region attributes */
/* I-side Region access control register */
static inline void iracr_write(u32 v)
{
write_sysreg(v, IRACR);
}
/* I-side Region size register */
static inline void irsr_write(u32 v)
{
write_sysreg(v, IRSR);
}
/* I-side Region base address register */
static inline void irbar_write(u32 v)
{
write_sysreg(v, IRBAR);
}
static inline u32 irbar_read(void)
{
return read_sysreg(IRBAR);
}
#else
static inline void rgnr_write(u32 v)
{
writel_relaxed(v, BASEADDR_V7M_SCB + PMSAv7_RNR);
}
/* Data-side / unified region attributes */
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/memblock.h`, `linux/string.h`, `asm/cacheflush.h`, `asm/cp15.h`, `asm/cputype.h`, `asm/mpu.h`, `asm/sections.h`.
- Detected declarations: `struct region`, `function rgnr_write`, `function dracr_write`, `function drsr_write`, `function drbar_write`, `function drbar_read`, `function iracr_write`, `function irsr_write`, `function irbar_write`, `function irbar_read`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.