cpu_dead should only run on current pcpu
no need for input param pcpu_id. Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
d2627ecfcc
commit
d2bac7cc5d
|
@ -598,12 +598,16 @@ void cpu_do_idle(void)
|
|||
__asm __volatile("pause" ::: "memory");
|
||||
}
|
||||
|
||||
void cpu_dead(uint16_t pcpu_id)
|
||||
/**
|
||||
* only run on current pcpu
|
||||
*/
|
||||
void cpu_dead(void)
|
||||
{
|
||||
/* 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.
|
||||
*/
|
||||
int32_t halt = 1;
|
||||
uint16_t pcpu_id = get_cpu_id();
|
||||
|
||||
if (bitmap_test_and_clear_lock(pcpu_id, &pcpu_active_bitmap)) {
|
||||
/* clean up native stuff */
|
||||
|
|
|
@ -72,7 +72,7 @@ static void enter_guest_mode(uint16_t pcpu_id)
|
|||
default_idle();
|
||||
|
||||
/* Control should not come here */
|
||||
cpu_dead(pcpu_id);
|
||||
cpu_dead();
|
||||
}
|
||||
|
||||
static void bsp_boot_post(void)
|
||||
|
|
|
@ -376,7 +376,7 @@ void dispatch_exception(struct intr_excp_ctx *ctx)
|
|||
spinlock_release(&exception_spinlock);
|
||||
|
||||
/* Halt the CPU */
|
||||
cpu_dead(pcpu_id);
|
||||
cpu_dead();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PARTITION_MODE
|
||||
|
|
|
@ -175,7 +175,7 @@ void default_idle(void)
|
|||
if (need_reschedule(pcpu_id) != 0) {
|
||||
schedule();
|
||||
} else if (need_offline(pcpu_id) != 0) {
|
||||
cpu_dead(pcpu_id);
|
||||
cpu_dead();
|
||||
} else {
|
||||
CPU_IRQ_ENABLE();
|
||||
handle_complete_ioreq(pcpu_id);
|
||||
|
|
|
@ -306,7 +306,7 @@ extern struct cpuinfo_x86 boot_cpu_data;
|
|||
|
||||
/* Function prototypes */
|
||||
void cpu_do_idle(void);
|
||||
void cpu_dead(uint16_t pcpu_id);
|
||||
void cpu_dead(void);
|
||||
void trampoline_start16(void);
|
||||
bool is_apicv_reg_virtualization_supported(void);
|
||||
bool is_apicv_intr_delivery_supported(void);
|
||||
|
|
Loading…
Reference in New Issue