arch/powerpc/kernel/swsusp.c
Source file repositories/reference/linux-study-clean/arch/powerpc/kernel/swsusp.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/kernel/swsusp.c- Extension
.c- Size
- 650 bytes
- Lines
- 34
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/sched.hlinux/suspend.hasm/current.hasm/mmu_context.hasm/switch_to.h
Detected Declarations
function save_processor_statefunction restore_processor_state
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Common powerpc suspend code for 32 and 64 bits
*
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
*/
#include <linux/sched.h>
#include <linux/suspend.h>
#include <asm/current.h>
#include <asm/mmu_context.h>
#include <asm/switch_to.h>
void save_processor_state(void)
{
/*
* flush out all the special registers so we don't need
* to save them in the snapshot
*/
flush_all_to_thread(current);
#ifdef CONFIG_PPC64
hard_irq_disable();
#endif
}
void restore_processor_state(void)
{
#ifdef CONFIG_PPC32
switch_mmu_context(current->active_mm, current->active_mm, NULL);
#endif
}
Annotation
- Immediate include surface: `linux/sched.h`, `linux/suspend.h`, `asm/current.h`, `asm/mmu_context.h`, `asm/switch_to.h`.
- Detected declarations: `function save_processor_state`, `function restore_processor_state`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.