#include <linux/sched.h>
#include <linux/sched/task_stack.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/irq_work.h>
#include <linux/tick.h>
#include <linux/nmi.h>
#include <linux/cpuhotplug.h>
#include <linux/stackprotector.h>
#include <linux/pgtable.h>
#include <asm/paravirt.h>
#include <asm/idtentry.h>
#include <asm/desc.h>
#include <asm/cpu.h>
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <xen/interface/xen.h>
#include <xen/interface/vcpu.h>
#include <xen/interface/xenpmu.h>
#include <asm/spec-ctrl.h>
#include <asm/xen/interface.h>
#include <asm/xen/hypercall.h>
#include <xen/xen.h>
#include <xen/page.h>
#include <xen/events.h>
#include <xen/hvc-console.h>
#include "xen-ops.h"
cpumask_var_t xen_cpu_initialized_map;
static DEFINE_PER_CPU(struct xen_common_irq, xen_irq_work) = …;
static DEFINE_PER_CPU(struct xen_common_irq, xen_pmu_irq) = …;
static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id);
static void cpu_bringup(void)
{ … }
asmlinkage __visible void cpu_bringup_and_idle(void)
{ … }
void xen_smp_intr_free_pv(unsigned int cpu)
{ … }
int xen_smp_intr_init_pv(unsigned int cpu)
{ … }
static void __init xen_pv_smp_config(void)
{ … }
static void __init xen_pv_smp_prepare_boot_cpu(void)
{ … }
static void __init xen_pv_smp_prepare_cpus(unsigned int max_cpus)
{ … }
static int
cpu_initialize_context(unsigned int cpu, struct task_struct *idle)
{ … }
static int xen_pv_kick_ap(unsigned int cpu, struct task_struct *idle)
{ … }
static void xen_pv_poll_sync_state(void)
{ … }
#ifdef CONFIG_HOTPLUG_CPU
static int xen_pv_cpu_disable(void)
{ … }
static void xen_pv_cpu_die(unsigned int cpu)
{ … }
static void xen_pv_cleanup_dead_cpu(unsigned int cpu)
{ … }
static void __noreturn xen_pv_play_dead(void)
{ … }
#else
static int xen_pv_cpu_disable(void)
{
return -ENOSYS;
}
static void xen_pv_cpu_die(unsigned int cpu)
{
BUG();
}
static void xen_pv_cleanup_dead_cpu(unsigned int cpu)
{
BUG();
}
static void __noreturn xen_pv_play_dead(void)
{
BUG();
}
#endif
static void stop_self(void *v)
{ … }
static void xen_pv_stop_other_cpus(int wait)
{ … }
static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id)
{ … }
void __init xen_smp_count_cpus(void)
{ … }
static const struct smp_ops xen_smp_ops __initconst = …;
void __init xen_smp_init(void)
{ … }