arch/s390/include/asm/page.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/page.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/page.h- Extension
.h- Size
- 7246 bytes
- Lines
- 296
- Domain
- Architecture Layer
- Bucket
- arch/s390
- 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.
- 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/const.hasm/types.hasm/asm.hvdso/page.hasm/setup.hasm-generic/memory_model.hasm-generic/getorder.h
Detected Declarations
struct pagestruct foliostruct vm_layoutfunction storage_key_init_rangefunction copy_pagefunction page_set_storage_keyfunction page_get_storage_keyfunction page_reset_referencedfunction devmem_is_allowedfunction kaslr_offsetfunction kaslr_enabledfunction __pa_nodebugfunction __phys_addrfunction virt_to_pfn
Annotated Snippet
struct vm_layout {
unsigned long kaslr_offset;
unsigned long kaslr_offset_phys;
unsigned long identity_base;
unsigned long identity_size;
};
extern struct vm_layout vm_layout;
#define __kaslr_offset vm_layout.kaslr_offset
#define __kaslr_offset_phys vm_layout.kaslr_offset_phys
#ifdef CONFIG_RANDOMIZE_IDENTITY_BASE
#define __identity_base vm_layout.identity_base
#else
#define __identity_base 0UL
#endif
#define ident_map_size vm_layout.identity_size
static inline unsigned long kaslr_offset(void)
{
return __kaslr_offset;
}
extern int __kaslr_enabled;
static inline int kaslr_enabled(void)
{
if (IS_ENABLED(CONFIG_RANDOMIZE_BASE))
return __kaslr_enabled;
return 0;
}
#define __PAGE_OFFSET __identity_base
#define PAGE_OFFSET __PAGE_OFFSET
#ifdef __DECOMPRESSOR
#define __pa_nodebug(x) ((unsigned long)(x))
#define __pa(x) __pa_nodebug(x)
#define __pa32(x) __pa(x)
#define __va(x) ((void *)(unsigned long)(x))
#else /* __DECOMPRESSOR */
static inline unsigned long __pa_nodebug(unsigned long x)
{
if (x < __kaslr_offset)
return x - __identity_base;
return x - __kaslr_offset + __kaslr_offset_phys;
}
#ifdef CONFIG_DEBUG_VIRTUAL
unsigned long __phys_addr(unsigned long x, bool is_31bit);
#else /* CONFIG_DEBUG_VIRTUAL */
static inline unsigned long __phys_addr(unsigned long x, bool is_31bit)
{
return __pa_nodebug(x);
}
#endif /* CONFIG_DEBUG_VIRTUAL */
#define __pa(x) __phys_addr((unsigned long)(x), false)
#define __pa32(x) __phys_addr((unsigned long)(x), true)
#define __va(x) ((void *)((unsigned long)(x) + __identity_base))
#endif /* __DECOMPRESSOR */
#define phys_to_pfn(phys) ((phys) >> PAGE_SHIFT)
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
#define phys_to_folio(phys) page_folio(phys_to_page(phys))
#define folio_to_phys(page) pfn_to_phys(folio_pfn(folio))
static inline void *pfn_to_virt(unsigned long pfn)
{
return __va(pfn_to_phys(pfn));
}
static inline unsigned long virt_to_pfn(const void *kaddr)
{
return phys_to_pfn(__pa(kaddr));
}
#define pfn_to_kaddr(pfn) pfn_to_virt(pfn)
#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
#define page_to_virt(page) pfn_to_virt(page_to_pfn(page))
Annotation
- Immediate include surface: `linux/const.h`, `asm/types.h`, `asm/asm.h`, `vdso/page.h`, `asm/setup.h`, `asm-generic/memory_model.h`, `asm-generic/getorder.h`.
- Detected declarations: `struct page`, `struct folio`, `struct vm_layout`, `function storage_key_init_range`, `function copy_page`, `function page_set_storage_key`, `function page_get_storage_key`, `function page_reset_referenced`, `function devmem_is_allowed`, `function kaslr_offset`.
- Atlas domain: Architecture Layer / arch/s390.
- 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.