As suggested by Ingo, revert r42648 and apply patch from Alex Smith provided in #7872. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42650 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1266,14 +1266,15 @@ smp_get_current_cpu(void)
|
|||||||
void
|
void
|
||||||
call_all_cpus(void (*func)(void*, int), void* cookie)
|
call_all_cpus(void (*func)(void*, int), void* cookie)
|
||||||
{
|
{
|
||||||
|
cpu_status state = disable_interrupts();
|
||||||
|
|
||||||
// if inter-CPU communication is not yet enabled, use the early mechanism
|
// if inter-CPU communication is not yet enabled, use the early mechanism
|
||||||
if (!sICIEnabled) {
|
if (!sICIEnabled) {
|
||||||
call_all_cpus_early(func, cookie);
|
call_all_cpus_early(func, cookie);
|
||||||
|
restore_interrupts(state);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_status state = disable_interrupts();
|
|
||||||
|
|
||||||
if (smp_get_num_cpus() > 1) {
|
if (smp_get_num_cpus() > 1) {
|
||||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
||||||
0, 0, (void*)func, SMP_MSG_FLAG_ASYNC);
|
0, 0, (void*)func, SMP_MSG_FLAG_ASYNC);
|
||||||
@@ -1289,14 +1290,15 @@ call_all_cpus(void (*func)(void*, int), void* cookie)
|
|||||||
void
|
void
|
||||||
call_all_cpus_sync(void (*func)(void*, int), void* cookie)
|
call_all_cpus_sync(void (*func)(void*, int), void* cookie)
|
||||||
{
|
{
|
||||||
|
cpu_status state = disable_interrupts();
|
||||||
|
|
||||||
// if inter-CPU communication is not yet enabled, use the early mechanism
|
// if inter-CPU communication is not yet enabled, use the early mechanism
|
||||||
if (!sICIEnabled) {
|
if (!sICIEnabled) {
|
||||||
call_all_cpus_early(func, cookie);
|
call_all_cpus_early(func, cookie);
|
||||||
|
restore_interrupts(state);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_status state = disable_interrupts();
|
|
||||||
|
|
||||||
if (smp_get_num_cpus() > 1) {
|
if (smp_get_num_cpus() > 1) {
|
||||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
||||||
0, 0, (void*)func, SMP_MSG_FLAG_SYNC);
|
0, 0, (void*)func, SMP_MSG_FLAG_SYNC);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static void
|
|||||||
per_cpu_real_time_clock_changed(void*, int cpu)
|
per_cpu_real_time_clock_changed(void*, int cpu)
|
||||||
{
|
{
|
||||||
per_cpu_timer_data& cpuData = sPerCPU[cpu];
|
per_cpu_timer_data& cpuData = sPerCPU[cpu];
|
||||||
InterruptsSpinLocker cpuDataLocker(cpuData.lock);
|
SpinLocker cpuDataLocker(cpuData.lock);
|
||||||
|
|
||||||
bigtime_t realTimeOffset = rtc_boot_time();
|
bigtime_t realTimeOffset = rtc_boot_time();
|
||||||
if (realTimeOffset == cpuData.real_time_offset)
|
if (realTimeOffset == cpuData.real_time_offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user