/* * This function is called when the system is being restarted or halted due * to some sort of system failure. If this is the case we need to notify the * other partitions to disengage from all references to our memory. * This function can also be called when our heartbeater could be offlined * for a time. In this case we need to notify other partitions to not worry * about the lack of a heartbeat. */ static int xpc_system_die(struct notifier_block *nb, unsigned long event, void *_die_args) { #ifdef CONFIG_IA64 /* !!! temporary kludge */ switch (event) { case DIE_MACHINE_RESTART: case DIE_MACHINE_HALT: xpc_die_deactivate(); break; case DIE_KDEBUG_ENTER: /* Should lack of heartbeat be ignored by other partitions? */ if (!xpc_kdebug_ignore) break; /* fall through */ case DIE_MCA_MONARCH_ENTER: case DIE_INIT_MONARCH_ENTER: xpc_arch_ops.offline_heartbeat(); break; case DIE_KDEBUG_LEAVE: /* Is lack of heartbeat being ignored by other partitions? */ if (!xpc_kdebug_ignore) break; /* fall through */ case DIE_MCA_MONARCH_LEAVE: case DIE_INIT_MONARCH_LEAVE: xpc_arch_ops.online_heartbeat(); break; } #else struct die_args *die_args = _die_args; switch (event) { case DIE_TRAP: if (die_args->trapnr == X86_TRAP_DF) xpc_die_deactivate(); if (((die_args->trapnr == X86_TRAP_MF) || (die_args->trapnr == X86_TRAP_XF)) && !user_mode_vm(die_args->regs)) xpc_die_deactivate(); break; case DIE_INT3: case DIE_DEBUG: break; case DIE_OOPS: case DIE_GPF: default: xpc_die_deactivate(); } #endif return NOTIFY_DONE; }
/* * This function is called when the system is being restarted or halted due * to some sort of system failure. If this is the case we need to notify the * other partitions to disengage from all references to our memory. * This function can also be called when our heartbeater could be offlined * for a time. In this case we need to notify other partitions to not worry * about the lack of a heartbeat. */ static int xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) { #ifdef CONFIG_IA64 /* !!! temporary kludge */ switch (event) { case DIE_MACHINE_RESTART: case DIE_MACHINE_HALT: xpc_die_deactivate(); break; case DIE_KDEBUG_ENTER: /* Should lack of heartbeat be ignored by other partitions? */ if (!xpc_kdebug_ignore) break; /* fall through */ case DIE_MCA_MONARCH_ENTER: case DIE_INIT_MONARCH_ENTER: xpc_offline_heartbeat(); break; case DIE_KDEBUG_LEAVE: /* Is lack of heartbeat being ignored by other partitions? */ if (!xpc_kdebug_ignore) break; /* fall through */ case DIE_MCA_MONARCH_LEAVE: case DIE_INIT_MONARCH_LEAVE: xpc_online_heartbeat(); break; } #else xpc_die_deactivate(); #endif return NOTIFY_DONE; }
static int xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused) { #ifdef CONFIG_IA64 /* */ switch (event) { case DIE_MACHINE_RESTART: case DIE_MACHINE_HALT: xpc_die_deactivate(); break; case DIE_KDEBUG_ENTER: /* */ if (!xpc_kdebug_ignore) break; /* */ case DIE_MCA_MONARCH_ENTER: case DIE_INIT_MONARCH_ENTER: xpc_arch_ops.offline_heartbeat(); break; case DIE_KDEBUG_LEAVE: /* */ if (!xpc_kdebug_ignore) break; /* */ case DIE_MCA_MONARCH_LEAVE: case DIE_INIT_MONARCH_LEAVE: xpc_arch_ops.online_heartbeat(); break; } #else xpc_die_deactivate(); #endif return NOTIFY_DONE; }