monitor_init: fix undetected hang on highest numbered core

Original commit: 7d38ead4f ("Fix for bug#99 Change setting value for
monitor->num_processors.")

Change-Id: I437c957fa319c014316a6064cc660e337668bb88
This commit is contained in:
Shiratori, Takehiro
2018-01-17 15:07:41 +09:00
committed by Dominique Martinet
parent dfd23c3ebe
commit 9f31abf402

View File

@ -224,14 +224,14 @@ static void monitor_init()
}
z = sizeof(struct ihk_os_monitor) +
sizeof(struct ihk_os_cpu_monitor) * (cpu_info->ncpus - 1);
sizeof(struct ihk_os_cpu_monitor) * cpu_info->ncpus;
z = (z + PAGE_SIZE -1) >> PAGE_SHIFT;
monitor = ihk_mc_alloc_pages(z, IHK_MC_AP_CRITICAL);
memset(monitor, 0, z * PAGE_SIZE);
monitor->num_processors = (cpu_info->ncpus - 1);
monitor->num_processors = cpu_info->ncpus;
phys = virt_to_phys(monitor);
ihk_set_monitor(phys, sizeof(struct ihk_os_monitor) +
sizeof(struct ihk_os_cpu_monitor) * (cpu_info->ncpus - 1));
sizeof(struct ihk_os_cpu_monitor) * cpu_info->ncpus);
return;
#else /* POSTK_DEBUG_TEMP_FIX_73 */