From 9f31abf402445e3331e75e85230bc8ee605ad085 Mon Sep 17 00:00:00 2001 From: "Shiratori, Takehiro" Date: Wed, 17 Jan 2018 15:07:41 +0900 Subject: [PATCH] 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 --- kernel/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/init.c b/kernel/init.c index db0f811d..211a5072 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -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 */