cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/xen/smp_hvm.c

Directory: arch/x86/xen
// SPDX-License-Identifier: GPL-2.0
#include <asm/smp.h>

#include <xen/events.h>

#include "xen-ops.h"
#include "smp.h"



static void __init xen_hvm_smp_prepare_boot_cpu(void) { BUG_ON(smp_processor_id() != 0); native_smp_prepare_boot_cpu(); /* * Setup vcpu_info for boot CPU. Secondary CPUs get their vcpu_info * in xen_cpu_up_prepare_hvm(). */ xen_vcpu_setup(0); /* * The alternative logic (which patches the unlock/lock) runs before * the smp bootup up code is activated. Hence we need to set this up * the core kernel is being patched. Otherwise we will have only * modules patched but not core code. */ xen_init_spinlocks(); }

Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov2996.67%150.00%
Ankur Arora13.33%150.00%
Total30100.00%2100.00%


static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus) { int cpu; native_smp_prepare_cpus(max_cpus); WARN_ON(xen_smp_intr_init(0)); xen_init_lock_cpu(0); for_each_possible_cpu(cpu) { if (cpu == 0) continue; /* Set default vcpu_id to make sure that we don't use cpu-0's */ per_cpu(xen_vcpu_id, cpu) = XEN_VCPU_ID_INVALID; } }

Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov2952.73%150.00%
Ankur Arora2647.27%150.00%
Total55100.00%2100.00%

#ifdef CONFIG_HOTPLUG_CPU
static void xen_hvm_cpu_die(unsigned int cpu) { if (common_cpu_die(cpu) == 0) { xen_smp_intr_free(cpu); xen_uninit_lock_cpu(cpu); xen_teardown_timer(cpu); } }

Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov36100.00%1100.00%
Total36100.00%1100.00%

#else
static void xen_hvm_cpu_die(unsigned int cpu) { BUG(); }

Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov13100.00%1100.00%
Total13100.00%1100.00%

#endif
void __init xen_hvm_smp_init(void) { if (!xen_have_vector_callback) return; smp_ops.smp_prepare_cpus = xen_hvm_smp_prepare_cpus; smp_ops.smp_send_reschedule = xen_smp_send_reschedule; smp_ops.cpu_die = xen_hvm_cpu_die; smp_ops.send_call_func_ipi = xen_smp_send_call_function_ipi; smp_ops.send_call_func_single_ipi = xen_smp_send_call_function_single_ipi; smp_ops.smp_prepare_boot_cpu = xen_hvm_smp_prepare_boot_cpu; smp_ops.smp_cpus_done = xen_smp_cpus_done; }

Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov4478.57%133.33%
Boris Ostrovsky610.71%133.33%
Ankur Arora610.71%133.33%
Total56100.00%3100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Vitaly Kuznetsov16779.52%116.67%
Ankur Arora3315.71%350.00%
Boris Ostrovsky94.29%116.67%
Greg Kroah-Hartman10.48%116.67%
Total210100.00%6100.00%
Directory: arch/x86/xen
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.