File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -598,12 +598,16 @@ void cpu_do_idle(void)
598
598
__asm __volatile ("pause" ::: "memory" );
599
599
}
600
600
601
- void cpu_dead (uint16_t pcpu_id )
601
+ /**
602
+ * only run on current pcpu
603
+ */
604
+ void cpu_dead (void )
602
605
{
603
606
/* For debug purposes, using a stack variable in the while loop enables
604
607
* us to modify the value using a JTAG probe and resume if needed.
605
608
*/
606
609
int32_t halt = 1 ;
610
+ uint16_t pcpu_id = get_cpu_id ();
607
611
608
612
if (bitmap_test_and_clear_lock (pcpu_id , & pcpu_active_bitmap )) {
609
613
/* clean up native stuff */
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ static void enter_guest_mode(uint16_t pcpu_id)
72
72
default_idle ();
73
73
74
74
/* Control should not come here */
75
- cpu_dead (pcpu_id );
75
+ cpu_dead ();
76
76
}
77
77
78
78
static void bsp_boot_post (void )
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ void dispatch_exception(struct intr_excp_ctx *ctx)
376
376
spinlock_release (& exception_spinlock );
377
377
378
378
/* Halt the CPU */
379
- cpu_dead (pcpu_id );
379
+ cpu_dead ();
380
380
}
381
381
382
382
#ifdef CONFIG_PARTITION_MODE
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ void default_idle(void)
175
175
if (need_reschedule (pcpu_id ) != 0 ) {
176
176
schedule ();
177
177
} else if (need_offline (pcpu_id ) != 0 ) {
178
- cpu_dead (pcpu_id );
178
+ cpu_dead ();
179
179
} else {
180
180
CPU_IRQ_ENABLE ();
181
181
handle_complete_ioreq (pcpu_id );
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ extern struct cpuinfo_x86 boot_cpu_data;
306
306
307
307
/* Function prototypes */
308
308
void cpu_do_idle (void );
309
- void cpu_dead (uint16_t pcpu_id );
309
+ void cpu_dead (void );
310
310
void trampoline_start16 (void );
311
311
bool is_apicv_reg_virtualization_supported (void );
312
312
bool is_apicv_intr_delivery_supported (void );
You can’t perform that action at this time.
0 commit comments