arch/sparc/kernel/setup_64.c
Source file repositories/reference/linux-study-clean/arch/sparc/kernel/setup_64.c
File Facts
- System
- Linux kernel
- Corpus path
arch/sparc/kernel/setup_64.c- Extension
.c- Size
- 16654 bytes
- Lines
- 698
- Domain
- Architecture Layer
- Bucket
- arch/sparc
- 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/errno.hlinux/sched.hlinux/kernel.hlinux/mm.hlinux/stddef.hlinux/unistd.hlinux/ptrace.hasm/smp.hlinux/user.hlinux/delay.hlinux/fs.hlinux/seq_file.hlinux/syscalls.hlinux/kdev_t.hlinux/major.hlinux/string.hlinux/init.hlinux/inet.hlinux/console.hlinux/root_dev.hlinux/interrupt.hlinux/cpu.hlinux/initrd.hlinux/module.hlinux/start_kernel.hlinux/memblock.huapi/linux/mount.hasm/io.hasm/processor.hasm/oplib.hasm/page.hasm/idprom.h
Detected Declarations
function prom_console_writefunction process_switchfunction boot_flags_initfunction per_cpu_patchfunction sun4v_patch_1insn_rangefunction sun4v_patch_2insn_rangefunction sun_m7_patch_2insn_rangefunction sun4v_patchfunction popc_patchfunction pause_patchfunction start_early_bootfunction cpucap_infofunction report_one_hwcapfunction report_crypto_hwcapsfunction report_hwcapsfunction mdesc_cpu_hwcap_listfunction init_sparc64_elf_hwcapfunction alloc_irqstack_bootmemfunction for_each_possible_cpufunction setup_archfunction sun_do_breakexport ns87303_lockexport sparc64_elf_hwcapexport sun_do_breakexport stop_a_enabled
Annotated Snippet
#include <linux/start_kernel.h>
#include <linux/memblock.h>
#include <uapi/linux/mount.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/oplib.h>
#include <asm/page.h>
#include <asm/idprom.h>
#include <asm/head.h>
#include <asm/starfire.h>
#include <asm/mmu_context.h>
#include <asm/timer.h>
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/mmu.h>
#include <asm/ns87303.h>
#include <asm/btext.h>
#include <asm/elf.h>
#include <asm/mdesc.h>
#include <asm/cacheflush.h>
#include <asm/dma.h>
#include <asm/irq.h>
#ifdef CONFIG_IP_PNP
#include <net/ipconfig.h>
#endif
#include "entry.h"
#include "kernel.h"
/* Used to synchronize accesses to NatSemi SUPER I/O chip configure
* operations in asm/ns87303.h
*/
DEFINE_SPINLOCK(ns87303_lock);
EXPORT_SYMBOL(ns87303_lock);
static void
prom_console_write(struct console *con, const char *s, unsigned int n)
{
prom_write(s, n);
}
/* Exported for mm/init.c:paging_init. */
unsigned long cmdline_memory_size = 0;
static struct console prom_early_console = {
.name = "earlyprom",
.write = prom_console_write,
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
.index = -1,
};
/*
* Process kernel command line switches that are specific to the
* SPARC or that require special low-level processing.
*/
static void __init process_switch(char c)
{
switch (c) {
case 'd':
case 's':
break;
case 'h':
prom_printf("boot_flags_init: Halt!\n");
prom_halt();
break;
case 'p':
prom_early_console.flags &= ~CON_BOOT;
break;
case 'P':
/* Force UltraSPARC-III P-Cache on. */
if (tlb_type != cheetah) {
printk("BOOT: Ignoring P-Cache force option.\n");
break;
}
cheetah_pcache_forced_on = 1;
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
cheetah_enable_pcache();
break;
default:
printk("Unknown boot switch (-%c)\n", c);
break;
}
}
static void __init boot_flags_init(char *commands)
{
while (*commands) {
Annotation
- Immediate include surface: `linux/errno.h`, `linux/sched.h`, `linux/kernel.h`, `linux/mm.h`, `linux/stddef.h`, `linux/unistd.h`, `linux/ptrace.h`, `asm/smp.h`.
- Detected declarations: `function prom_console_write`, `function process_switch`, `function boot_flags_init`, `function per_cpu_patch`, `function sun4v_patch_1insn_range`, `function sun4v_patch_2insn_range`, `function sun_m7_patch_2insn_range`, `function sun4v_patch`, `function popc_patch`, `function pause_patch`.
- Atlas domain: Architecture Layer / arch/sparc.
- 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.