arch/powerpc/platforms/microwatt/setup.c
Source file repositories/reference/linux-study-clean/arch/powerpc/platforms/microwatt/setup.c
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/platforms/microwatt/setup.c- Extension
.c- Size
- 1229 bytes
- Lines
- 62
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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.
Dependency Surface
linux/types.hlinux/kernel.hlinux/stddef.hlinux/init.hlinux/of.hlinux/of_platform.hasm/machdep.hasm/time.hasm/xics.hasm/udbg.hmicrowatt.h
Detected Declarations
function Mackerrasfunction microwatt_populatefunction microwatt_probefunction microwatt_setup_archfunction microwatt_idle
Annotated Snippet
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <asm/machdep.h>
#include <asm/time.h>
#include <asm/xics.h>
#include <asm/udbg.h>
#include "microwatt.h"
static void __init microwatt_init_IRQ(void)
{
xics_init();
}
static int __init microwatt_populate(void)
{
return of_platform_default_populate(NULL, NULL, NULL);
}
machine_arch_initcall(microwatt, microwatt_populate);
static int __init microwatt_probe(void)
{
/* Main reason for having this is to start the other CPU(s) */
if (IS_ENABLED(CONFIG_SMP))
microwatt_init_smp();
return 1;
}
static void __init microwatt_setup_arch(void)
{
microwatt_rng_init();
}
static void microwatt_idle(void)
{
if (!prep_irq_for_idle_irqsoff())
return;
__asm__ __volatile__ ("wait");
}
define_machine(microwatt) {
.name = "microwatt",
.compatible = "microwatt-soc",
.probe = microwatt_probe,
.init_IRQ = microwatt_init_IRQ,
.setup_arch = microwatt_setup_arch,
.progress = udbg_progress,
.power_save = microwatt_idle,
};
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/stddef.h`, `linux/init.h`, `linux/of.h`, `linux/of_platform.h`, `asm/machdep.h`, `asm/time.h`.
- Detected declarations: `function Mackerras`, `function microwatt_populate`, `function microwatt_probe`, `function microwatt_setup_arch`, `function microwatt_idle`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source 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.