arch/powerpc/platforms/ps3/setup.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/ps3/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/ps3/setup.c- Extension
.c- Size
- 6767 bytes
- Lines
- 304
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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/kernel.hlinux/delay.hlinux/fs.hlinux/root_dev.hlinux/sysfs.hlinux/console.hlinux/export.hlinux/memblock.hlinux/of.hasm/machdep.hasm/firmware.hasm/time.hasm/iommu.hasm/udbg.hasm/lv1call.hasm/ps3gpu.hplatform.h
Detected Declarations
function ps3_get_firmware_versionfunction ps3_compare_firmware_versionfunction ps3_power_savefunction ps3_restartfunction ps3_power_offfunction ps3_haltfunction ps3_panicfunction definedfunction early_parse_ps3fbfunction early_parse_ps3flashfunction ps3_set_dabrfunction ps3_fw_version_showfunction ps3_setup_sysfsfunction ps3_setup_archfunction ps3_progressfunction ps3_early_mm_initfunction ps3_probefunction ps3_kexec_cpu_downmodule init ps3_setup_sysfsexport ps3_gpu_mutexexport ps3_get_firmware_versionexport ps3_compare_firmware_versionexport ps3fb_videomemoryexport ps3flash_bounce_buffer
Annotated Snippet
core_initcall(ps3_setup_sysfs);
static void __init ps3_setup_arch(void)
{
u64 tmp;
DBG(" -> %s:%d\n", __func__, __LINE__);
lv1_get_version_info(&ps3_firmware_version.raw, &tmp);
snprintf(ps3_firmware_version_str, sizeof(ps3_firmware_version_str),
"%u.%u.%u", ps3_firmware_version.major,
ps3_firmware_version.minor, ps3_firmware_version.rev);
printk(KERN_INFO "PS3 firmware version %s\n", ps3_firmware_version_str);
ps3_spu_set_platform();
#ifdef CONFIG_SMP
smp_init_ps3();
#endif
prealloc_ps3fb_videomemory();
prealloc_ps3flash_bounce_buffer();
ppc_md.power_save = ps3_power_save;
ps3_os_area_init();
DBG(" <- %s:%d\n", __func__, __LINE__);
}
static void __init ps3_progress(char *s, unsigned short hex)
{
printk("*** %04x : %s\n", hex, s ? s : "");
}
void __init ps3_early_mm_init(void)
{
unsigned long htab_size;
ps3_mm_init();
ps3_mm_vas_create(&htab_size);
ps3_hpte_init(htab_size);
}
static int __init ps3_probe(void)
{
DBG(" -> %s:%d\n", __func__, __LINE__);
ps3_os_area_save_params();
pm_power_off = ps3_power_off;
DBG(" <- %s:%d\n", __func__, __LINE__);
return 1;
}
#if defined(CONFIG_KEXEC_CORE)
static void ps3_kexec_cpu_down(int crash_shutdown, int secondary)
{
int cpu = smp_processor_id();
DBG(" -> %s:%d: (%d)\n", __func__, __LINE__, cpu);
ps3_smp_cleanup_cpu(cpu);
ps3_shutdown_IRQ(cpu);
DBG(" <- %s:%d\n", __func__, __LINE__);
}
#endif
define_machine(ps3) {
.name = "PS3",
.compatible = "sony,ps3",
.probe = ps3_probe,
.setup_arch = ps3_setup_arch,
.init_IRQ = ps3_init_IRQ,
.panic = ps3_panic,
.get_boot_time = ps3_get_boot_time,
.set_dabr = ps3_set_dabr,
.calibrate_decr = ps3_calibrate_decr,
.progress = ps3_progress,
.restart = ps3_restart,
.halt = ps3_halt,
#if defined(CONFIG_KEXEC_CORE)
.kexec_cpu_down = ps3_kexec_cpu_down,
#endif
};
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/delay.h`, `linux/fs.h`, `linux/root_dev.h`, `linux/sysfs.h`, `linux/console.h`, `linux/export.h`, `linux/memblock.h`.
- Detected declarations: `function ps3_get_firmware_version`, `function ps3_compare_firmware_version`, `function ps3_power_save`, `function ps3_restart`, `function ps3_power_off`, `function ps3_halt`, `function ps3_panic`, `function defined`, `function early_parse_ps3fb`, `function early_parse_ps3flash`.
- Atlas domain: Architecture Layer / arch/powerpc.
- 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.