freeze: change freeze-thaw to normal interrupt

Change-Id: Ib4dbac28f0074595e92ef316945b37ef4bc18327
This commit is contained in:
TOIDA,Suguru
2019-08-27 13:32:37 +09:00
committed by Masamichi Takagi
parent 299d47abf5
commit ff982b8594
8 changed files with 67 additions and 33 deletions

View File

@ -1,11 +1,12 @@
/* freeze.c COPYRIGHT FUJITSU LIMITED 2019 */
#include <kmsg.h>
#include <string.h>
#include <ihk/cpu.h>
#include <ihk/debug.h>
#include <cls.h>
#include <ihk/monitor.h>
#include <init.h>
extern int nmi_mode;
extern void mod_nmi_ctx(void *, void(*)());
extern void lapic_ack();
extern void __freeze();
@ -29,7 +30,7 @@ freeze_thaw(void *nmi_ctx)
{
struct ihk_os_cpu_monitor *monitor = cpu_local_var(monitor);
if (nmi_mode == 1) {
if (multi_intr_mode == 1) {
if (monitor->status != IHK_OS_MONITOR_KERNEL_FROZEN) {
#if 1
mod_nmi_ctx(nmi_ctx, __freeze);
@ -48,7 +49,7 @@ freeze_thaw(void *nmi_ctx)
#endif
}
}
else if(nmi_mode == 2) {
else if (multi_intr_mode == 2) {
if (monitor->status == IHK_OS_MONITOR_KERNEL_FROZEN) {
monitor->status = IHK_OS_MONITOR_KERNEL_THAW;
}

View File

@ -9,6 +9,7 @@
/*
* HISTORY:
*/
/* init.h COPYRIGHT FUJITSU LIMITED 2019 */
#ifndef INIT_H
#define INIT_H
@ -38,5 +39,6 @@ extern void dynamic_debug_sysfs_setup(void);
extern char *find_command_line(char *name);
extern int num_processors;
extern int multi_intr_mode;
#endif

View File

@ -18,6 +18,7 @@
* 2013/06/02 balazs resolved merge conflicts with futex code
* 2013/05/20 simin exchange the dcfa stuff init/exit order in mcexec
*/
/* init.c COPYRIGHT FUJITSU LIMITED 2019 */
#include <types.h>
#include <kmsg.h>
#include <kmalloc.h>
@ -230,8 +231,17 @@ void monitor_init(void)
return;
}
int multi_intr_mode;
int nmi_mode;
static void multi_intr_init(void)
{
unsigned long phys;
phys = virt_to_phys(&multi_intr_mode);
ihk_set_multi_intr_mode_addr(phys);
}
static void nmi_init()
{
unsigned long phys;
@ -256,6 +266,7 @@ static void rest_init(void)
ap_init();
cpu_local_var_init();
multi_intr_init();
nmi_init();
uti_init();
time_init();