arch/powerpc/include/asm/mman.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/mman.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/mman.h- Extension
.h- Size
- 1132 bytes
- Lines
- 45
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
Dependency Surface
uapi/asm/mman.hasm/cputable.hlinux/mm.hlinux/pkeys.hasm/cpu_has_feature.hasm/firmware.h
Detected Declarations
function arch_calc_vm_prot_bitsfunction arch_validate_prot
Annotated Snippet
#ifndef _ASM_POWERPC_MMAN_H
#define _ASM_POWERPC_MMAN_H
#include <uapi/asm/mman.h>
#if defined(CONFIG_PPC64) && !defined(BUILD_VDSO)
#include <asm/cputable.h>
#include <linux/mm.h>
#include <linux/pkeys.h>
#include <asm/cpu_has_feature.h>
#include <asm/firmware.h>
static inline vm_flags_t arch_calc_vm_prot_bits(unsigned long prot,
unsigned long pkey)
{
#ifdef CONFIG_PPC_MEM_KEYS
return (((prot & PROT_SAO) ? VM_SAO : 0) | pkey_to_vmflag_bits(pkey));
#else
return ((prot & PROT_SAO) ? VM_SAO : 0);
#endif
}
#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
static inline bool arch_validate_prot(unsigned long prot, unsigned long addr)
{
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM | PROT_SAO))
return false;
if (prot & PROT_SAO) {
if (!cpu_has_feature(CPU_FTR_SAO))
return false;
if (firmware_has_feature(FW_FEATURE_LPAR) &&
!IS_ENABLED(CONFIG_PPC_PROT_SAO_LPAR))
return false;
}
return true;
}
#define arch_validate_prot arch_validate_prot
#endif /* CONFIG_PPC64 */
#endif /* _ASM_POWERPC_MMAN_H */
Annotation
- Immediate include surface: `uapi/asm/mman.h`, `asm/cputable.h`, `linux/mm.h`, `linux/pkeys.h`, `asm/cpu_has_feature.h`, `asm/firmware.h`.
- Detected declarations: `function arch_calc_vm_prot_bits`, `function arch_validate_prot`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.