arch/powerpc/mm/pgtable_64.c
Source file repositories/reference/linux-study-clean/arch/powerpc/mm/pgtable_64.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/mm/pgtable_64.c- Extension
.c- Size
- 4064 bytes
- Lines
- 163
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
- 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/signal.hlinux/sched.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/export.hlinux/types.hlinux/mman.hlinux/mm.hlinux/swap.hlinux/stddef.hlinux/vmalloc.hlinux/slab.hlinux/hugetlb.hasm/page.hasm/mmu_context.hasm/mmu.hasm/smp.hasm/machdep.hasm/tlb.hasm/processor.hasm/cputable.hasm/sections.hasm/firmware.hasm/dma.hmm/mmu_decl.h
Detected Declarations
function mark_rodata_rofunction mark_initmem_nxexport __pte_index_sizeexport __pmd_index_sizeexport __pud_index_sizeexport __pgd_index_sizeexport __pud_cache_indexexport __pte_table_sizeexport __pmd_table_sizeexport __pud_table_sizeexport __pgd_table_sizeexport __pmd_val_bitsexport __pud_val_bitsexport __pgd_val_bitsexport __kernel_virt_startexport __vmalloc_startexport __vmalloc_endexport __kernel_io_startexport vmemmapexport __pte_frag_nrexport __pte_frag_size_shift
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* This file contains pgtable related functions for 64-bit machines.
*
* Derived from arch/ppc64/mm/init.c
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
*
* Modifications by Paul Mackerras (PowerMac) (paulus@samba.org)
* and Cort Dougan (PReP) (cort@cs.nmt.edu)
* Copyright (C) 1996 Paul Mackerras
*
* Derived from "arch/i386/mm/init.c"
* Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
*
* Dave Engebretsen <engebret@us.ibm.com>
* Rework for PPC64 port.
*/
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/stddef.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/hugetlb.h>
#include <asm/page.h>
#include <asm/mmu_context.h>
#include <asm/mmu.h>
#include <asm/smp.h>
#include <asm/machdep.h>
#include <asm/tlb.h>
#include <asm/processor.h>
#include <asm/cputable.h>
#include <asm/sections.h>
#include <asm/firmware.h>
#include <asm/dma.h>
#include <mm/mmu_decl.h>
#ifdef CONFIG_PPC_BOOK3S_64
/*
* partition table and process table for ISA 3.0
*/
struct prtb_entry *process_tb;
struct patb_entry *partition_tb;
/*
* page table size
*/
unsigned long __pte_index_size;
EXPORT_SYMBOL(__pte_index_size);
unsigned long __pmd_index_size;
EXPORT_SYMBOL(__pmd_index_size);
unsigned long __pud_index_size;
EXPORT_SYMBOL(__pud_index_size);
unsigned long __pgd_index_size;
EXPORT_SYMBOL(__pgd_index_size);
unsigned long __pud_cache_index;
EXPORT_SYMBOL(__pud_cache_index);
unsigned long __pte_table_size;
EXPORT_SYMBOL(__pte_table_size);
unsigned long __pmd_table_size;
EXPORT_SYMBOL(__pmd_table_size);
unsigned long __pud_table_size;
EXPORT_SYMBOL(__pud_table_size);
unsigned long __pgd_table_size;
EXPORT_SYMBOL(__pgd_table_size);
unsigned long __pmd_val_bits;
EXPORT_SYMBOL(__pmd_val_bits);
unsigned long __pud_val_bits;
EXPORT_SYMBOL(__pud_val_bits);
unsigned long __pgd_val_bits;
EXPORT_SYMBOL(__pgd_val_bits);
unsigned long __kernel_virt_start;
EXPORT_SYMBOL(__kernel_virt_start);
unsigned long __vmalloc_start;
EXPORT_SYMBOL(__vmalloc_start);
unsigned long __vmalloc_end;
EXPORT_SYMBOL(__vmalloc_end);
unsigned long __kernel_io_start;
EXPORT_SYMBOL(__kernel_io_start);
unsigned long __kernel_io_end;
Annotation
- Immediate include surface: `linux/signal.h`, `linux/sched.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/export.h`, `linux/types.h`, `linux/mman.h`.
- Detected declarations: `function mark_rodata_ro`, `function mark_initmem_nx`, `export __pte_index_size`, `export __pmd_index_size`, `export __pud_index_size`, `export __pgd_index_size`, `export __pud_cache_index`, `export __pte_table_size`, `export __pmd_table_size`, `export __pud_table_size`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: integration 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.