arch/s390/include/asm/pgtable.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/pgtable.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/pgtable.h- Extension
.h- Size
- 60984 bytes
- Lines
- 2010
- 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.
- 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/sched.hlinux/mm_types.hlinux/cpufeature.hlinux/page-flags.hlinux/page_table_check.hlinux/radix-tree.hlinux/atomic.hlinux/mmap_lock.hasm/ctlreg.hasm/bug.hasm/page.hasm/uv.h
Detected Declarations
function update_page_countfunction is_module_addrfunction mm_p4d_foldedfunction mm_pud_foldedfunction mm_pmd_foldedfunction mm_is_protectedfunction clear_pte_bitfunction set_pte_bitfunction clear_pmd_bitfunction set_pmd_bitfunction clear_pud_bitfunction set_pud_bitfunction mm_forbids_zeropagefunction cspgfunction crdtefunction pgd_foldedfunction pgd_presentfunction pgd_nonefunction pgd_badfunction pgd_pfnfunction p4d_foldedfunction p4d_presentfunction p4d_nonefunction p4d_pfnfunction pud_foldedfunction pud_presentfunction pud_nonefunction pud_leaffunction pmd_presentfunction pmd_leaffunction pmd_badfunction pud_badfunction p4d_badfunction pmd_nonefunction pmd_writefunction pud_writefunction pmd_dirtyfunction pmd_youngfunction pte_presentfunction pte_nonefunction pte_swapfunction pte_specialfunction pte_samefunction pte_protnonefunction pmd_protnonefunction pte_swp_exclusivefunction pte_swp_mkexclusivefunction pte_swp_clear_exclusive
Annotated Snippet
#ifndef _ASM_S390_PGTABLE_H
#define _ASM_S390_PGTABLE_H
#include <linux/sched.h>
#include <linux/mm_types.h>
#include <linux/cpufeature.h>
#include <linux/page-flags.h>
#include <linux/page_table_check.h>
#include <linux/radix-tree.h>
#include <linux/atomic.h>
#include <linux/mmap_lock.h>
#include <asm/ctlreg.h>
#include <asm/bug.h>
#include <asm/page.h>
#include <asm/uv.h>
extern pgd_t swapper_pg_dir[];
extern pgd_t invalid_pg_dir[];
extern void paging_init(void);
extern struct ctlreg s390_invalid_asce;
enum {
PG_DIRECT_MAP_4K = 0,
PG_DIRECT_MAP_1M,
PG_DIRECT_MAP_2G,
PG_DIRECT_MAP_MAX
};
extern atomic_long_t direct_pages_count[PG_DIRECT_MAP_MAX];
static inline void update_page_count(int level, long count)
{
if (IS_ENABLED(CONFIG_PROC_FS))
atomic_long_add(count, &direct_pages_count[level]);
}
/*
* The S390 doesn't have any external MMU info: the kernel page
* tables contain all the necessary information.
*/
#define update_mmu_cache(vma, address, ptep) do { } while (0)
#define update_mmu_cache_range(vmf, vma, addr, ptep, nr) do { } while (0)
#define update_mmu_cache_pmd(vma, address, ptep) do { } while (0)
/*
* ZERO_PAGE is a global shared page that is always zero; used
* for zero-mapped memory areas etc..
*/
extern unsigned long empty_zero_page;
extern unsigned long zero_page_mask;
#define ZERO_PAGE(vaddr) \
(virt_to_page((void *)(empty_zero_page + \
(((unsigned long)(vaddr)) &zero_page_mask))))
#define __HAVE_COLOR_ZERO_PAGE
/* TODO: s390 cannot support io_remap_pfn_range... */
#define pte_ERROR(e) \
pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
#define pmd_ERROR(e) \
pr_err("%s:%d: bad pmd %016lx.\n", __FILE__, __LINE__, pmd_val(e))
#define pud_ERROR(e) \
pr_err("%s:%d: bad pud %016lx.\n", __FILE__, __LINE__, pud_val(e))
#define p4d_ERROR(e) \
pr_err("%s:%d: bad p4d %016lx.\n", __FILE__, __LINE__, p4d_val(e))
#define pgd_ERROR(e) \
pr_err("%s:%d: bad pgd %016lx.\n", __FILE__, __LINE__, pgd_val(e))
/*
* The vmalloc and module area will always be on the topmost area of the
* kernel mapping. 512GB are reserved for vmalloc by default.
* At the top of the vmalloc area a 2GB area is reserved where modules
* will reside. That makes sure that inter module branches always
* happen without trampolines and in addition the placement within a
* 2GB frame is branch prediction unit friendly.
*/
extern unsigned long VMALLOC_START;
extern unsigned long VMALLOC_END;
#define VMALLOC_DEFAULT_SIZE ((512UL << 30) - MODULES_LEN)
extern struct page *vmemmap;
extern unsigned long vmemmap_size;
extern unsigned long MODULES_VADDR;
extern unsigned long MODULES_END;
#define MODULES_VADDR MODULES_VADDR
#define MODULES_END MODULES_END
#define MODULES_LEN (1UL << 31)
Annotation
- Immediate include surface: `linux/sched.h`, `linux/mm_types.h`, `linux/cpufeature.h`, `linux/page-flags.h`, `linux/page_table_check.h`, `linux/radix-tree.h`, `linux/atomic.h`, `linux/mmap_lock.h`.
- Detected declarations: `function update_page_count`, `function is_module_addr`, `function mm_p4d_folded`, `function mm_pud_folded`, `function mm_pmd_folded`, `function mm_is_protected`, `function clear_pte_bit`, `function set_pte_bit`, `function clear_pmd_bit`, `function set_pmd_bit`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source 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.