mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-15 22:09:06 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user