mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
Add initial symmetric multi-processing (SMP) support to UML. With this support enabled, users can tell UML to start multiple virtual processors, each represented as a separate host thread. In UML, kthreads and normal threads (when running in kernel mode) can be scheduled and executed simultaneously on different virtual processors. However, the userspace code of normal threads still runs within their respective single-threaded stubs. That is, SMP support is currently available both within the kernel and across different processes, but still remains limited within threads of the same process in userspace. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20251027001815.1666872-6-tiwei.bie@linux.dev Signed-off-by: Johannes Berg <johannes.berg@intel.com>
21 lines
397 B
C
21 lines
397 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __UM_SMP_H
|
|
#define __UM_SMP_H
|
|
|
|
#if IS_ENABLED(CONFIG_SMP)
|
|
|
|
#include <linux/cpumask.h>
|
|
#include <shared/smp.h>
|
|
|
|
#define raw_smp_processor_id() uml_curr_cpu()
|
|
|
|
void arch_smp_send_reschedule(int cpu);
|
|
|
|
void arch_send_call_function_single_ipi(int cpu);
|
|
|
|
void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
|
|
|
#endif /* CONFIG_SMP */
|
|
|
|
#endif
|