drivers/ps3/sys-manager-core.c
Source file repositories/reference/linux-study-clean/drivers/ps3/sys-manager-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ps3/sys-manager-core.c- Extension
.c- Size
- 1403 bytes
- Lines
- 62
- Domain
- Driver Families
- Bucket
- drivers/ps3
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- 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/kernel.hlinux/export.hasm/lv1call.hasm/ps3.h
Detected Declarations
function ps3_sys_manager_probefunction ps3_sys_manager_power_offfunction ps3_sys_manager_restartfunction ps3_sys_manager_haltexport ps3_sys_manager_register_ops
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* PS3 System Manager core.
*
* Copyright (C) 2007 Sony Computer Entertainment Inc.
* Copyright 2007 Sony Corp.
*/
#include <linux/kernel.h>
#include <linux/export.h>
#include <asm/lv1call.h>
#include <asm/ps3.h>
/**
* Statically linked routines that allow late binding of a loaded sys-manager
* module.
*/
static struct ps3_sys_manager_ops ps3_sys_manager_ops;
/**
* ps3_register_sys_manager_ops - Bind ps3_sys_manager_ops to a module.
* @ops: struct ps3_sys_manager_ops.
*
* To be called from ps3_sys_manager_probe() and ps3_sys_manager_remove() to
* register call back ops for power control. Copies data to the static
* variable ps3_sys_manager_ops.
*/
void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops)
{
BUG_ON(!ops);
BUG_ON(!ops->dev);
ps3_sys_manager_ops = *ops;
}
EXPORT_SYMBOL_GPL(ps3_sys_manager_register_ops);
void __noreturn ps3_sys_manager_power_off(void)
{
if (ps3_sys_manager_ops.power_off)
ps3_sys_manager_ops.power_off(ps3_sys_manager_ops.dev);
ps3_sys_manager_halt();
}
void __noreturn ps3_sys_manager_restart(void)
{
if (ps3_sys_manager_ops.restart)
ps3_sys_manager_ops.restart(ps3_sys_manager_ops.dev);
ps3_sys_manager_halt();
}
void __noreturn ps3_sys_manager_halt(void)
{
pr_emerg("System Halted, OK to turn off power\n");
local_irq_disable();
while (1)
lv1_pause(1);
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/export.h`, `asm/lv1call.h`, `asm/ps3.h`.
- Detected declarations: `function ps3_sys_manager_probe`, `function ps3_sys_manager_power_off`, `function ps3_sys_manager_restart`, `function ps3_sys_manager_halt`, `export ps3_sys_manager_register_ops`.
- Atlas domain: Driver Families / drivers/ps3.
- 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.