From b7d57a946bf40b49862f9be1b5056eaec522f676 Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Wed, 11 Apr 2018 09:46:41 +0800 Subject: [PATCH] cpu: change cpu_halt name to cpu_dead cpu_halt actually mean cpu dead in current code, so change it with more clear name. Signed-off-by: Jason Chen CJ Acked-by: Tian, Kevin --- hypervisor/arch/x86/cpu.c | 6 +++--- hypervisor/arch/x86/irq.c | 2 +- hypervisor/include/arch/x86/cpu.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index e0a739846..6268f102f 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -510,7 +510,7 @@ void bsp_boot_init(void) hv_main(CPU_BOOT_ID); /* Control should not come here */ - cpu_halt(CPU_BOOT_ID); + cpu_dead(CPU_BOOT_ID); } void cpu_secondary_init(void) @@ -580,7 +580,7 @@ void cpu_secondary_init(void) /* Control will only come here for secondary CPUs not configured for * use or if an error occurs in hv_main */ - cpu_halt(get_cpu_id()); + cpu_dead(get_cpu_id()); } int cpu_find_logical_id(uint32_t lapic_id) @@ -643,7 +643,7 @@ static void start_cpus() } #endif -void cpu_halt(uint32_t logical_id) +void cpu_dead(uint32_t logical_id) { /* For debug purposes, using a stack variable in the while loop enables * us to modify the value using a JTAG probe and resume if needed. diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c index 0363e7534..9dc9416e0 100644 --- a/hypervisor/arch/x86/irq.c +++ b/hypervisor/arch/x86/irq.c @@ -440,7 +440,7 @@ void dispatch_exception(struct intr_ctx *ctx) spinlock_release(&exception_spinlock); /* Halt the CPU */ - cpu_halt(cpu_id); + cpu_dead(cpu_id); } void handle_spurious_interrupt(int vector) diff --git a/hypervisor/include/arch/x86/cpu.h b/hypervisor/include/arch/x86/cpu.h index 6a3085932..21c82d817 100644 --- a/hypervisor/include/arch/x86/cpu.h +++ b/hypervisor/include/arch/x86/cpu.h @@ -250,7 +250,7 @@ extern struct cpuinfo_x86 boot_cpu_data; #define MAX_PSTATE 20 /* Function prototypes */ -void cpu_halt(uint32_t logical_id); +void cpu_dead(uint32_t logical_id); uint64_t cpu_cycles_per_second(void); uint64_t tsc_cycles_in_period(uint16_t timer_period_in_us); void cpu_secondary_reset(void);