File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -107,14 +107,6 @@ config LOG_DESTINATION
107
107
are 3 destinations available. Bit 0 represents the serial console, bit
108
108
1 the SOS ACRN log and bit 2 NPK log. Effective only in debug builds.
109
109
110
- config CPU_UP_TIMEOUT
111
- int "Timeout in ms when bringing up secondary CPUs"
112
- range 100 200
113
- default 100
114
- help
115
- A 32-bit integer specifying the timeout in millisecond when waiting
116
- for secondary CPUs to start up.
117
-
118
110
choice
119
111
prompt "Serial IO type"
120
112
depends on !RELEASE
Original file line number Diff line number Diff line change 27
27
#include <cat.h>
28
28
#include <firmware.h>
29
29
30
+ #define CPU_UP_TIMEOUT 100U /* millisecond */
31
+ #define CPU_DOWN_TIMEOUT 100U /* millisecond */
32
+
30
33
struct per_cpu_region per_cpu_data [CONFIG_MAX_PCPU_NUM ] __aligned (PAGE_SIZE );
31
34
static uint16_t phys_cpu_num = 0U ;
32
35
static uint64_t pcpu_sync = 0UL ;
@@ -273,7 +276,7 @@ static void start_cpu(uint16_t pcpu_id)
273
276
/* Wait until the pcpu with pcpu_id is running and set the active bitmap or
274
277
* configured time-out has expired
275
278
*/
276
- timeout = ( uint32_t ) CONFIG_CPU_UP_TIMEOUT * 1000U ;
279
+ timeout = CPU_UP_TIMEOUT * 1000U ;
277
280
while (!is_pcpu_active (pcpu_id ) && (timeout != 0U )) {
278
281
/* Delay 10us */
279
282
udelay (10U );
@@ -317,7 +320,6 @@ void stop_cpus(void)
317
320
uint16_t pcpu_id , expected_up ;
318
321
uint32_t timeout ;
319
322
320
- timeout = (uint32_t )CONFIG_CPU_UP_TIMEOUT * 1000U ;
321
323
for (pcpu_id = 0U ; pcpu_id < phys_cpu_num ; pcpu_id ++ ) {
322
324
if (get_cpu_id () == pcpu_id ) { /* avoid offline itself */
323
325
continue ;
@@ -327,6 +329,7 @@ void stop_cpus(void)
327
329
}
328
330
329
331
expected_up = 1U ;
332
+ timeout = CPU_DOWN_TIMEOUT * 1000U ;
330
333
while ((atomic_load16 (& up_count ) != expected_up ) && (timeout != 0U )) {
331
334
/* Delay 10us */
332
335
udelay (10U );
You can’t perform that action at this time.
0 commit comments