Changeset 4872160 in mainline for kernel/arch/sparc64/src/smp/sun4v/smp.c
- Timestamp:
- 2010-05-04T10:44:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 568db0f
- Parents:
- bb252ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/smp/sun4v/smp.c
rbb252ca r4872160 417 417 static bool wake_cpu(uint64_t cpuid) 418 418 { 419 420 419 #ifdef CONFIG_SIMICS_SMP_HACK 421 420 ipi_unicast_to((void (*)(void)) 1234, cpuid); … … 424 423 if (__hypercall_fast1(CPU_STOP, cpuid) != EOK) 425 424 return false; 426 425 427 426 /* wait for the CPU to stop */ 428 427 uint64_t state; 429 __hypercall_fast_ret1(cpuid, 0, 0, 0, 0, 430 CPU_STATE, &state); 431 while (state == CPU_STATE_RUNNING) { 432 __hypercall_fast_ret1(cpuid, 0, 0, 0, 0, 433 CPU_STATE, &state); 434 } 435 428 __hypercall_fast_ret1(cpuid, 0, 0, 0, 0, CPU_STATE, &state); 429 while (state == CPU_STATE_RUNNING) 430 __hypercall_fast_ret1(cpuid, 0, 0, 0, 0, CPU_STATE, &state); 431 436 432 /* make the CPU run again and execute HelenOS code */ 437 if (__hypercall_fast4( 438 CPU_START, cpuid, 439 (uint64_t) KA2PA(kernel_image_start), 440 KA2PA(trap_table), bootinfo.physmem_start 441 ) != EOK) 442 return false; 433 if (__hypercall_fast4(CPU_START, cpuid, 434 (uint64_t) KA2PA(kernel_image_start), KA2PA(trap_table), 435 physmem_start) != EOK) 436 return false; 443 437 #endif 444 438 445 439 if (waitq_sleep_timeout(&ap_completion_wq, 10000000, SYNCH_FLAGS_NONE) == 446 447 printf("%s: waiting for processor (cpuid = %" PRIu32 448 ") timed out\n",__func__, cpuid);449 440 ESYNCH_TIMEOUT) 441 printf("%s: waiting for processor (cpuid = %" PRIu32 ") timed out\n", 442 __func__, cpuid); 443 450 444 return true; 451 445 }
Note:
See TracChangeset
for help on using the changeset viewer.