arch/mips/sibyte/sb1250/smp.c
Source file repositories/reference/linux-study-clean/arch/mips/sibyte/sb1250/smp.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/sibyte/sb1250/smp.c- Extension
.c- Size
- 4013 bytes
- Lines
- 169
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/delay.hlinux/interrupt.hlinux/smp.hlinux/kernel_stat.hlinux/sched/task_stack.hasm/mmu_context.hasm/io.hasm/fw/cfe/cfe_api.hasm/sibyte/sb1250.hasm/sibyte/sb1250_regs.hasm/sibyte/sb1250_int.h
Detected Declarations
function sb1250_smp_initfunction sb1250_send_ipi_singlefunction sb1250_send_ipi_maskfunction sb1250_init_secondaryfunction sb1250_smp_finishfunction sb1250_boot_secondaryfunction sb1250_smp_setupfunction sb1250_prepare_cpusfunction sb1250_mailbox_interrupt
Annotated Snippet
if (cfe_cpu_stop(i) == 0) {
set_cpu_possible(i, true);
__cpu_number_map[i] = ++num;
__cpu_logical_map[num] = i;
}
}
printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num);
}
static void __init sb1250_prepare_cpus(unsigned int max_cpus)
{
}
const struct plat_smp_ops sb_smp_ops = {
.send_ipi_single = sb1250_send_ipi_single,
.send_ipi_mask = sb1250_send_ipi_mask,
.init_secondary = sb1250_init_secondary,
.smp_finish = sb1250_smp_finish,
.boot_secondary = sb1250_boot_secondary,
.smp_setup = sb1250_smp_setup,
.prepare_cpus = sb1250_prepare_cpus,
};
void sb1250_mailbox_interrupt(void)
{
int cpu = smp_processor_id();
int irq = K_INT_MBOX_0;
unsigned int action;
kstat_incr_irq_this_cpu(irq);
/* Load the mailbox register to figure out what we're supposed to do */
action = (____raw_readq(mailbox_regs[cpu]) >> 48) & 0xffff;
/* Clear the mailbox to clear the interrupt */
____raw_writeq(((u64)action) << 48, mailbox_clear_regs[cpu]);
if (action & SMP_RESCHEDULE_YOURSELF)
scheduler_ipi();
if (action & SMP_CALL_FUNCTION) {
irq_enter();
generic_smp_call_function_interrupt();
irq_exit();
}
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/smp.h`, `linux/kernel_stat.h`, `linux/sched/task_stack.h`, `asm/mmu_context.h`, `asm/io.h`.
- Detected declarations: `function sb1250_smp_init`, `function sb1250_send_ipi_single`, `function sb1250_send_ipi_mask`, `function sb1250_init_secondary`, `function sb1250_smp_finish`, `function sb1250_boot_secondary`, `function sb1250_smp_setup`, `function sb1250_prepare_cpus`, `function sb1250_mailbox_interrupt`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.