mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00: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>
32 lines
683 B
C
32 lines
683 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_UM_HARDIRQ_H
|
|
#define __ASM_UM_HARDIRQ_H
|
|
|
|
#include <linux/cache.h>
|
|
#include <linux/threads.h>
|
|
|
|
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
|
|
|
|
typedef struct {
|
|
unsigned int __softirq_pending;
|
|
#if IS_ENABLED(CONFIG_SMP)
|
|
unsigned int irq_resched_count;
|
|
unsigned int irq_call_count;
|
|
#endif
|
|
} ____cacheline_aligned irq_cpustat_t;
|
|
|
|
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
|
|
|
#define __ARCH_IRQ_STAT
|
|
|
|
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
|
|
|
|
#include <linux/irq.h>
|
|
|
|
static inline void ack_bad_irq(unsigned int irq)
|
|
{
|
|
pr_crit("unexpected IRQ trap at vector %02x\n", irq);
|
|
}
|
|
|
|
#endif /* __ASM_UM_HARDIRQ_H */
|