arch/m68k/mm/init.c
Source file repositories/reference/linux-study-clean/arch/m68k/mm/init.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/mm/init.c- Extension
.c- Size
- 2546 bytes
- Lines
- 119
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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
linux/module.hlinux/signal.hlinux/sched.hlinux/mm.hlinux/swap.hlinux/kernel.hlinux/string.hlinux/types.hlinux/init.hlinux/memblock.hlinux/gfp.hasm/setup.hlinux/uaccess.hasm/page.hasm/pgalloc.hasm/traps.hasm/machdep.hasm/io.hasm/atari_stram.hasm/sections.hasm/tlb.h
Detected Declarations
function Copyrightfunction m68k_setup_nodefunction paging_initfunction free_initmemfunction init_pointer_tablesfunction mem_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* linux/arch/m68k/mm/init.c
*
* Copyright (C) 1995 Hamish Macdonald
*
* Contains common initialization routines, specific init code moved
* to motorola.c and sun3mmu.c
*/
#include <linux/module.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/memblock.h>
#include <linux/gfp.h>
#include <asm/setup.h>
#include <linux/uaccess.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/io.h>
#ifdef CONFIG_ATARI
#include <asm/atari_stram.h>
#endif
#include <asm/sections.h>
#include <asm/tlb.h>
void __init arch_zone_limits_init(unsigned long *max_zone_pfns)
{
max_zone_pfns[ZONE_DMA] = PFN_DOWN(memblock_end_of_DRAM());
}
#ifdef CONFIG_MMU
int m68k_virt_to_node_shift;
void __init m68k_setup_node(int node)
{
node_set_online(node);
}
#else /* CONFIG_MMU */
/*
* paging_init() continues the virtual memory environment setup which
* was begun by the code in arch/head.S.
* The parameters are pointers to where to stick the starting and ending
* addresses of available kernel virtual memory.
*/
void __init paging_init(void)
{
/*
* Make sure start_mem is page aligned, otherwise bootmem and
* page_alloc get different views of the world.
*/
unsigned long end_mem = memory_end & PAGE_MASK;
high_memory = (void *) end_mem;
}
#endif /* CONFIG_MMU */
void free_initmem(void)
{
#ifndef CONFIG_MMU_SUN3
free_initmem_default(-1);
#endif /* CONFIG_MMU_SUN3 */
}
#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
#define VECTORS &vectors[0]
#else
#define VECTORS _ramvec
#endif
static inline void init_pointer_tables(void)
{
#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
int i, j;
/* insert pointer tables allocated so far into the tablelist */
init_pointer_table(kernel_pg_dir, TABLE_PGD);
Annotation
- Immediate include surface: `linux/module.h`, `linux/signal.h`, `linux/sched.h`, `linux/mm.h`, `linux/swap.h`, `linux/kernel.h`, `linux/string.h`, `linux/types.h`.
- Detected declarations: `function Copyright`, `function m68k_setup_node`, `function paging_init`, `function free_initmem`, `function init_pointer_tables`, `function mem_init`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.