arch/m68k/kernel/setup_mm.c
Source file repositories/reference/linux-study-clean/arch/m68k/kernel/setup_mm.c
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/kernel/setup_mm.c- Extension
.c- Size
- 13929 bytes
- Lines
- 608
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- 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/cpu.hlinux/mm.hlinux/sched.hlinux/delay.hlinux/interrupt.hlinux/fs.hlinux/console.hlinux/errno.hlinux/string.hlinux/init.hlinux/memblock.hlinux/proc_fs.hlinux/seq_file.hlinux/module.hlinux/nvram.hlinux/initrd.hlinux/random.hasm/bootinfo.hasm/byteorder.hasm/sections.hasm/setup.hasm/fpu.hasm/irq.hasm/io.hasm/machdep.hasm/amigahw.hasm/atarihw.hasm/atari_stram.hasm/dvma.hasm/macintosh.hasm/natfeat.h
Detected Declarations
function m68k_parse_bootinfofunction setup_archfunction show_cpuinfofunction c_stopfunction hardware_proc_showfunction proc_hardware_initfunction arch_cpu_finalize_initfunction adb_probe_sync_enablefunction m68k_nvram_read_bytefunction m68k_nvram_write_bytefunction m68k_nvram_readfunction m68k_nvram_writefunction m68k_nvram_set_checksumfunction m68k_nvram_initializefunction m68k_nvram_get_sizemodule init proc_hardware_initexport m68k_machtypeexport m68k_cputypeexport m68k_mmutypeexport vme_brdtypeexport m68k_is040or060export m68k_num_memoryexport m68k_realnum_memoryexport m68k_memoryexport mach_heartbeatexport isa_typeexport isa_sexexport arch_nvram_ops
Annotated Snippet
module_init(proc_hardware_init);
#endif
void __init arch_cpu_finalize_init(void)
{
#if defined(CONFIG_FPU) && !defined(CONFIG_M68KFPU_EMU)
if (m68k_fputype == 0) {
pr_emerg("*** YOU DO NOT HAVE A FLOATING POINT UNIT, "
"WHICH IS REQUIRED BY LINUX/M68K ***\n");
pr_emerg("Upgrade your hardware or join the FPU "
"emulation project\n");
panic("no FPU");
}
#endif /* !CONFIG_M68KFPU_EMU */
}
#ifdef CONFIG_ADB
static int __init adb_probe_sync_enable (char *str) {
extern int __adb_probe_sync;
__adb_probe_sync = 1;
return 1;
}
__setup("adb_sync", adb_probe_sync_enable);
#endif /* CONFIG_ADB */
#if IS_ENABLED(CONFIG_NVRAM)
#ifdef CONFIG_MAC
static unsigned char m68k_nvram_read_byte(int addr)
{
if (MACH_IS_MAC)
return mac_pram_read_byte(addr);
return 0xff;
}
static void m68k_nvram_write_byte(unsigned char val, int addr)
{
if (MACH_IS_MAC)
mac_pram_write_byte(val, addr);
}
#endif /* CONFIG_MAC */
#ifdef CONFIG_ATARI
static ssize_t m68k_nvram_read(char *buf, size_t count, loff_t *ppos)
{
if (MACH_IS_ATARI)
return atari_nvram_read(buf, count, ppos);
else if (MACH_IS_MAC)
return nvram_read_bytes(buf, count, ppos);
return -EINVAL;
}
static ssize_t m68k_nvram_write(char *buf, size_t count, loff_t *ppos)
{
if (MACH_IS_ATARI)
return atari_nvram_write(buf, count, ppos);
else if (MACH_IS_MAC)
return nvram_write_bytes(buf, count, ppos);
return -EINVAL;
}
static long m68k_nvram_set_checksum(void)
{
if (MACH_IS_ATARI)
return atari_nvram_set_checksum();
return -EINVAL;
}
static long m68k_nvram_initialize(void)
{
if (MACH_IS_ATARI)
return atari_nvram_initialize();
return -EINVAL;
}
#endif /* CONFIG_ATARI */
static ssize_t m68k_nvram_get_size(void)
{
if (MACH_IS_ATARI)
return atari_nvram_get_size();
else if (MACH_IS_MAC)
return mac_pram_get_size();
return -ENODEV;
}
/* Atari device drivers call .read (to get checksum validation) whereas
* Mac and PowerMac device drivers just use .read_byte.
*/
const struct nvram_ops arch_nvram_ops = {
#ifdef CONFIG_MAC
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/cpu.h`, `linux/mm.h`, `linux/sched.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/fs.h`, `linux/console.h`.
- Detected declarations: `function m68k_parse_bootinfo`, `function setup_arch`, `function show_cpuinfo`, `function c_stop`, `function hardware_proc_show`, `function proc_hardware_init`, `function arch_cpu_finalize_init`, `function adb_probe_sync_enable`, `function m68k_nvram_read_byte`, `function m68k_nvram_write_byte`.
- Atlas domain: Architecture Layer / arch/m68k.
- 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.