arch/mips/cavium-octeon/setup.c
Source file repositories/reference/linux-study-clean/arch/mips/cavium-octeon/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/cavium-octeon/setup.c- Extension
.c- Size
- 34013 bytes
- Lines
- 1259
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
- 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/compiler.hlinux/vmalloc.hlinux/init.hlinux/kernel.hlinux/console.hlinux/delay.hlinux/export.hlinux/interrupt.hlinux/io.hlinux/memblock.hlinux/serial.hlinux/smp.hlinux/types.hlinux/string.hlinux/tty.hlinux/time.hlinux/platform_device.hlinux/serial_core.hlinux/serial_8250.hlinux/of_fdt.hlinux/libfdt.hlinux/kexec.hasm/processor.hasm/reboot.hasm/smp-ops.hasm/irq_cpu.hasm/mipsregs.hasm/bootinfo.hasm/sections.hasm/fw/fw.hasm/setup.hasm/prom.h
Detected Declarations
function octeon_kexec_smp_downfunction kexec_bootmem_initfunction octeon_kexec_preparefunction octeon_generic_shutdownfunction octeon_shutdownfunction octeon_crash_shutdownfunction octeon_crash_smp_send_stopfunction octeon_is_simulationfunction octeon_is_pci_hostfunction octeon_get_clock_ratefunction octeon_get_io_clock_ratefunction octeon_write_lcdfunction octeon_get_boot_uartfunction octeon_get_boot_coremaskfunction octeon_check_cpu_bistfunction octeon_restartfunction octeon_kill_corefunction octeon_haltfunction init_octeon_system_typefunction octeon_user_io_initfunction prom_initfunction octeon_has_featurefunction memory_exclude_pagefunction fw_init_cmdlinefunction plat_mem_setupfunction prom_putcharfunction prom_free_prom_memoryfunction device_tree_initfunction disable_octeon_edacfunction edac_devinitfunction octeon_no_pci_initfunction octeon_no_pci_releasemodule init edac_devinitmodule init octeon_no_pci_initexport octeon_should_swizzle_tableexport octeon_bootbus_semexport octeon_bootinfoexport octeon_reserve32_memoryexport octeon_is_simulationexport octeon_get_clock_rateexport octeon_get_io_clock_rateexport prom_putchar
Annotated Snippet
device_initcall(edac_devinit);
static void __initdata *octeon_dummy_iospace;
static int __init octeon_no_pci_init(void)
{
/*
* Initially assume there is no PCI. The PCI/PCIe platform code will
* later re-initialize these to correct values if they are present.
*/
octeon_dummy_iospace = vzalloc(IO_SPACE_LIMIT);
set_io_port_base((unsigned long)octeon_dummy_iospace);
ioport_resource.start = RESOURCE_SIZE_MAX;
ioport_resource.end = 0;
return 0;
}
core_initcall(octeon_no_pci_init);
static int __init octeon_no_pci_release(void)
{
/*
* Release the allocated memory if a real IO space is there.
*/
if ((unsigned long)octeon_dummy_iospace != mips_io_port_base)
vfree(octeon_dummy_iospace);
return 0;
}
late_initcall(octeon_no_pci_release);
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/vmalloc.h`, `linux/init.h`, `linux/kernel.h`, `linux/console.h`, `linux/delay.h`, `linux/export.h`, `linux/interrupt.h`.
- Detected declarations: `function octeon_kexec_smp_down`, `function kexec_bootmem_init`, `function octeon_kexec_prepare`, `function octeon_generic_shutdown`, `function octeon_shutdown`, `function octeon_crash_shutdown`, `function octeon_crash_smp_send_stop`, `function octeon_is_simulation`, `function octeon_is_pci_host`, `function octeon_get_clock_rate`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: integration 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.