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:
committed by
Dominique Martinet
parent
dfd23c3ebe
commit
9f31abf402
@@ -224,14 +224,14 @@ static void monitor_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
z = sizeof(struct ihk_os_monitor) +
|
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;
|
z = (z + PAGE_SIZE -1) >> PAGE_SHIFT;
|
||||||
monitor = ihk_mc_alloc_pages(z, IHK_MC_AP_CRITICAL);
|
monitor = ihk_mc_alloc_pages(z, IHK_MC_AP_CRITICAL);
|
||||||
memset(monitor, 0, z * PAGE_SIZE);
|
memset(monitor, 0, z * PAGE_SIZE);
|
||||||
monitor->num_processors = (cpu_info->ncpus - 1);
|
monitor->num_processors = cpu_info->ncpus;
|
||||||
phys = virt_to_phys(monitor);
|
phys = virt_to_phys(monitor);
|
||||||
ihk_set_monitor(phys, sizeof(struct ihk_os_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;
|
return;
|
||||||
#else /* POSTK_DEBUG_TEMP_FIX_73 */
|
#else /* POSTK_DEBUG_TEMP_FIX_73 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user