Skip to content

Commit

Permalink
smp!
Browse files Browse the repository at this point in the history
  • Loading branch information
tombl committed Mar 27, 2024
1 parent 58c30da commit 5f7f7ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/wasm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

int __cpu_up(unsigned int cpu, struct task_struct *idle)
{
BUG();
task_thread_info(idle)->cpu = cpu;
wasm_bringup_secondary(cpu, idle);
while (!cpu_online(cpu)) cpu_relax();
return 0;
}

static void noinline_for_stack start_secondary_inner(int cpu,
Expand All @@ -27,6 +29,8 @@ static void noinline_for_stack start_secondary_inner(int cpu,

notify_cpu_starting(cpu);

pr_info("init %i\n", idle->thread_info.cpu);

cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
}

Expand Down Expand Up @@ -66,13 +70,12 @@ void __init smp_prepare_boot_cpu(void)
void __init smp_prepare_cpus(unsigned int max_cpus)
{
memset(ipi_data, 0, sizeof(ipi_data));

early_printk("SMP bringup with %i parallel processes\n", NR_CPUS);
}

void smp_send_stop(void)
{
cpumask_t to_whom;
wasm_halt();
BUG();
cpumask_copy(&to_whom, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &to_whom);
Expand Down

0 comments on commit 5f7f7ac

Please sign in to comment.