arch/arm/mach-tegra/pm.c
Source file repositories/reference/linux-study-clean/arch/arm/mach-tegra/pm.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm/mach-tegra/pm.c- Extension
.c- Size
- 10136 bytes
- Lines
- 454
- Domain
- Architecture Layer
- Bucket
- arch/arm
- 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/clk/tegra.hlinux/cpumask.hlinux/cpu_pm.hlinux/delay.hlinux/err.hlinux/io.hlinux/kernel.hlinux/slab.hlinux/spinlock.hlinux/suspend.hlinux/firmware/trusted_foundations.hsoc/tegra/flowctrl.hsoc/tegra/fuse.hsoc/tegra/pm.hsoc/tegra/pmc.hasm/cacheflush.hasm/firmware.hasm/idmap.hasm/proc-fns.hasm/smp_plat.hasm/suspend.hasm/tlbflush.hiomap.hpm.hreset.hsleep.h
Detected Declarations
function tegra_tear_down_cpu_initfunction restore_cpu_complexfunction suspend_cpu_complexfunction tegra_pm_clear_cpu_in_lp2function tegra_pm_set_cpu_in_lp2function tegra_sleep_cpufunction tegra_pm_setfunction tegra_pm_enter_lp2function tegra_pm_validate_suspend_modefunction tegra_sleep_corefunction tegra_lp1_iram_hookfunction tegra_sleep_core_initfunction tegra_suspend_enter_lp1function tegra_suspend_exit_lp1function tegra_suspend_enterfunction tegra_pm_init_suspendfunction tegra_pm_park_secondary_cpu
Annotated Snippet
if (!tegra_lp1_iram_hook() || !tegra_sleep_core_init()) {
pr_err("%s: unable to allocate memory for SDRAM"
"self-refresh -- LP0/LP1 unavailable\n",
__func__);
tegra_pmc_set_suspend_mode(TEGRA_SUSPEND_LP2);
mode = TEGRA_SUSPEND_LP2;
}
}
/* set up sleep function for cpu_suspend */
switch (mode) {
case TEGRA_SUSPEND_LP1:
tegra_sleep_func = tegra_sleep_core;
break;
case TEGRA_SUSPEND_LP2:
tegra_sleep_func = tegra_sleep_cpu;
break;
default:
break;
}
suspend_set_ops(&tegra_suspend_ops);
}
int tegra_pm_park_secondary_cpu(unsigned long cpu)
{
if (cpu > 0) {
tegra_disable_clean_inv_dcache(TEGRA_FLUSH_CACHE_LOUIS);
if (tegra_get_chip_id() == TEGRA20)
tegra20_hotplug_shutdown();
else
tegra30_hotplug_shutdown();
}
return -EINVAL;
}
#endif
Annotation
- Immediate include surface: `linux/clk/tegra.h`, `linux/cpumask.h`, `linux/cpu_pm.h`, `linux/delay.h`, `linux/err.h`, `linux/io.h`, `linux/kernel.h`, `linux/slab.h`.
- Detected declarations: `function tegra_tear_down_cpu_init`, `function restore_cpu_complex`, `function suspend_cpu_complex`, `function tegra_pm_clear_cpu_in_lp2`, `function tegra_pm_set_cpu_in_lp2`, `function tegra_sleep_cpu`, `function tegra_pm_set`, `function tegra_pm_enter_lp2`, `function tegra_pm_validate_suspend_mode`, `function tegra_sleep_core`.
- Atlas domain: Architecture Layer / arch/arm.
- 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.