arch/arm/kernel/process.c
Source file repositories/reference/linux-study-clean/arch/arm/kernel/process.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/kernel/process.c- Extension
.c- Size
- 10568 bytes
- Lines
- 443
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/sched.hlinux/sched/debug.hlinux/sched/task.hlinux/sched/task_stack.hlinux/kernel.hlinux/mm.hlinux/stddef.hlinux/unistd.hlinux/user.hlinux/interrupt.hlinux/init.hlinux/elfcore.hlinux/pm.hlinux/tick.hlinux/utsname.hlinux/uaccess.hlinux/random.hlinux/hw_breakpoint.hlinux/leds.hasm/processor.hasm/thread_notify.hasm/stacktrace.hasm/system_misc.hasm/mach/time.hasm/tls.hasm/vdso.hsignal.hlinux/stackprotector.h
Detected Declarations
function arch_cpu_idlefunction arch_cpu_idle_preparefunction arch_cpu_idle_enterfunction arch_cpu_idle_exitfunction __show_regs_alloc_freefunction __show_regsfunction show_regsfunction exit_threadfunction flush_threadfunction copy_threadfunction __get_wchanfunction gate_vma_initfunction in_gate_areafunction in_gate_area_no_mmfunction sigpage_addrfunction sigpage_mremapfunction arch_setup_additional_pagesexport __stack_chk_guardexport __currentexport thread_notify_head
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/arch/arm/kernel/process.c
*
* Copyright (C) 1996-2000 Russell King - Converted to ARM.
* Original Copyright (C) 1995 Linus Torvalds
*/
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
#include <linux/sched/task.h>
#include <linux/sched/task_stack.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/user.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/elfcore.h>
#include <linux/pm.h>
#include <linux/tick.h>
#include <linux/utsname.h>
#include <linux/uaccess.h>
#include <linux/random.h>
#include <linux/hw_breakpoint.h>
#include <linux/leds.h>
#include <asm/processor.h>
#include <asm/thread_notify.h>
#include <asm/stacktrace.h>
#include <asm/system_misc.h>
#include <asm/mach/time.h>
#include <asm/tls.h>
#include <asm/vdso.h>
#include "signal.h"
#if defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) || defined(CONFIG_SMP)
DEFINE_PER_CPU(struct task_struct *, __entry_task);
#endif
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
#include <linux/stackprotector.h>
unsigned long __stack_chk_guard __read_mostly;
EXPORT_SYMBOL(__stack_chk_guard);
#endif
#ifndef CONFIG_CURRENT_POINTER_IN_TPIDRURO
asmlinkage struct task_struct *__current;
EXPORT_SYMBOL(__current);
#endif
static const char *processor_modes[] __maybe_unused = {
"USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
"UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
"USER_32", "FIQ_32" , "IRQ_32" , "SVC_32" , "UK4_32" , "UK5_32" , "MON_32" , "ABT_32" ,
"UK8_32" , "UK9_32" , "HYP_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
};
static const char *isa_modes[] __maybe_unused = {
"ARM" , "Thumb" , "Jazelle", "ThumbEE"
};
/*
* This is our default idle handler.
*/
void (*arm_pm_idle)(void);
/*
* Called from the core idle loop.
*/
void arch_cpu_idle(void)
{
if (arm_pm_idle)
arm_pm_idle();
else
cpu_do_idle();
}
void arch_cpu_idle_prepare(void)
{
local_fiq_enable();
}
void arch_cpu_idle_enter(void)
{
ledtrig_cpu(CPU_LED_IDLE_START);
Annotation
- Immediate include surface: `linux/export.h`, `linux/sched.h`, `linux/sched/debug.h`, `linux/sched/task.h`, `linux/sched/task_stack.h`, `linux/kernel.h`, `linux/mm.h`, `linux/stddef.h`.
- Detected declarations: `function arch_cpu_idle`, `function arch_cpu_idle_prepare`, `function arch_cpu_idle_enter`, `function arch_cpu_idle_exit`, `function __show_regs_alloc_free`, `function __show_regs`, `function show_regs`, `function exit_thread`, `function flush_thread`, `function copy_thread`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.