2005-06-23 11:09:27 +04:00
|
|
|
#ifndef _IA64_KDEBUG_H
|
|
|
|
#define _IA64_KDEBUG_H 1
|
|
|
|
/*
|
|
|
|
* include/asm-ia64/kdebug.h
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Copyright (C) Intel Corporation, 2005
|
|
|
|
*
|
|
|
|
* 2005-Apr Rusty Lynch <rusty.lynch@intel.com> and Anil S Keshavamurthy
|
|
|
|
* <anil.s.keshavamurthy@intel.com> adopted from
|
|
|
|
* include/asm-x86_64/kdebug.h
|
[IA64] Extend notify_die() hooks for IA64
notify_die() added for MCA_{MONARCH,SLAVE,RENDEZVOUS}_{ENTER,PROCESS,LEAVE} and
INIT_{MONARCH,SLAVE}_{ENTER,PROCESS,LEAVE}. We need multiple
notification points for these events because they can take many seconds
to run which has nasty effects on the behaviour of the rest of the
system.
DIE_SS replaced by a generic DIE_FAULT which checks the vector number,
to allow interception of faults other than SS.
DIE_MACHINE_{HALT,RESTART} added to allow last minute close down
processing, especially when the halt/restart routines are called from
error handlers.
DIE_OOPS added.
The check for kprobe's break numbers has been moved from traps.c to
kprobes.c, allowing DIE_BREAK to be used for any additional break
numbers, i.e. it is no longer kprobes specific.
Hooks for kernel debuggers and kernel dumpers added, ENTER and LEAVE.
Both of these disable the system for long periods which impact on
watchdogs and heartbeat systems in general. More patches to come that
use these events to reset watchdogs and heartbeats.
unregister_die_notifier() added and both routines exported. Requested
by Dean Nelson.
Lock removed from {un,}register_die_notifier. notifier_chain_register()
already takes a lock. Also the generic notifier chain locking is being
reworked to distinguish between callbacks that can block and those that
cannot, the lock in {un,}register_die_notifier would interfere with
that change. http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
Leading white space removed from arch/ia64/kernel/kprobes.c.
Typo in mca.c in original version of this patch found & fixed by Dean
Nelson.
Signed-off-by: Keith Owens <kaos@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Acked-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-07 22:27:13 +03:00
|
|
|
*
|
|
|
|
* 2005-Oct Keith Owens <kaos@sgi.com>. Expand notify_die to cover more
|
|
|
|
* events.
|
2005-06-23 11:09:27 +04:00
|
|
|
*/
|
|
|
|
#include <linux/notifier.h>
|
|
|
|
|
|
|
|
struct pt_regs;
|
|
|
|
|
|
|
|
struct die_args {
|
|
|
|
struct pt_regs *regs;
|
|
|
|
const char *str;
|
|
|
|
long err;
|
|
|
|
int trapnr;
|
|
|
|
int signr;
|
|
|
|
};
|
|
|
|
|
[IA64] Extend notify_die() hooks for IA64
notify_die() added for MCA_{MONARCH,SLAVE,RENDEZVOUS}_{ENTER,PROCESS,LEAVE} and
INIT_{MONARCH,SLAVE}_{ENTER,PROCESS,LEAVE}. We need multiple
notification points for these events because they can take many seconds
to run which has nasty effects on the behaviour of the rest of the
system.
DIE_SS replaced by a generic DIE_FAULT which checks the vector number,
to allow interception of faults other than SS.
DIE_MACHINE_{HALT,RESTART} added to allow last minute close down
processing, especially when the halt/restart routines are called from
error handlers.
DIE_OOPS added.
The check for kprobe's break numbers has been moved from traps.c to
kprobes.c, allowing DIE_BREAK to be used for any additional break
numbers, i.e. it is no longer kprobes specific.
Hooks for kernel debuggers and kernel dumpers added, ENTER and LEAVE.
Both of these disable the system for long periods which impact on
watchdogs and heartbeat systems in general. More patches to come that
use these events to reset watchdogs and heartbeats.
unregister_die_notifier() added and both routines exported. Requested
by Dean Nelson.
Lock removed from {un,}register_die_notifier. notifier_chain_register()
already takes a lock. Also the generic notifier chain locking is being
reworked to distinguish between callbacks that can block and those that
cannot, the lock in {un,}register_die_notifier would interfere with
that change. http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
Leading white space removed from arch/ia64/kernel/kprobes.c.
Typo in mca.c in original version of this patch found & fixed by Dean
Nelson.
Signed-off-by: Keith Owens <kaos@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Acked-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-07 22:27:13 +03:00
|
|
|
extern int register_die_notifier(struct notifier_block *);
|
|
|
|
extern int unregister_die_notifier(struct notifier_block *);
|
2005-06-23 11:09:27 +04:00
|
|
|
extern struct notifier_block *ia64die_chain;
|
|
|
|
|
|
|
|
enum die_val {
|
|
|
|
DIE_BREAK = 1,
|
[IA64] Extend notify_die() hooks for IA64
notify_die() added for MCA_{MONARCH,SLAVE,RENDEZVOUS}_{ENTER,PROCESS,LEAVE} and
INIT_{MONARCH,SLAVE}_{ENTER,PROCESS,LEAVE}. We need multiple
notification points for these events because they can take many seconds
to run which has nasty effects on the behaviour of the rest of the
system.
DIE_SS replaced by a generic DIE_FAULT which checks the vector number,
to allow interception of faults other than SS.
DIE_MACHINE_{HALT,RESTART} added to allow last minute close down
processing, especially when the halt/restart routines are called from
error handlers.
DIE_OOPS added.
The check for kprobe's break numbers has been moved from traps.c to
kprobes.c, allowing DIE_BREAK to be used for any additional break
numbers, i.e. it is no longer kprobes specific.
Hooks for kernel debuggers and kernel dumpers added, ENTER and LEAVE.
Both of these disable the system for long periods which impact on
watchdogs and heartbeat systems in general. More patches to come that
use these events to reset watchdogs and heartbeats.
unregister_die_notifier() added and both routines exported. Requested
by Dean Nelson.
Lock removed from {un,}register_die_notifier. notifier_chain_register()
already takes a lock. Also the generic notifier chain locking is being
reworked to distinguish between callbacks that can block and those that
cannot, the lock in {un,}register_die_notifier would interfere with
that change. http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
Leading white space removed from arch/ia64/kernel/kprobes.c.
Typo in mca.c in original version of this patch found & fixed by Dean
Nelson.
Signed-off-by: Keith Owens <kaos@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Acked-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-07 22:27:13 +03:00
|
|
|
DIE_FAULT,
|
|
|
|
DIE_OOPS,
|
2005-06-23 11:09:27 +04:00
|
|
|
DIE_PAGE_FAULT,
|
[IA64] Extend notify_die() hooks for IA64
notify_die() added for MCA_{MONARCH,SLAVE,RENDEZVOUS}_{ENTER,PROCESS,LEAVE} and
INIT_{MONARCH,SLAVE}_{ENTER,PROCESS,LEAVE}. We need multiple
notification points for these events because they can take many seconds
to run which has nasty effects on the behaviour of the rest of the
system.
DIE_SS replaced by a generic DIE_FAULT which checks the vector number,
to allow interception of faults other than SS.
DIE_MACHINE_{HALT,RESTART} added to allow last minute close down
processing, especially when the halt/restart routines are called from
error handlers.
DIE_OOPS added.
The check for kprobe's break numbers has been moved from traps.c to
kprobes.c, allowing DIE_BREAK to be used for any additional break
numbers, i.e. it is no longer kprobes specific.
Hooks for kernel debuggers and kernel dumpers added, ENTER and LEAVE.
Both of these disable the system for long periods which impact on
watchdogs and heartbeat systems in general. More patches to come that
use these events to reset watchdogs and heartbeats.
unregister_die_notifier() added and both routines exported. Requested
by Dean Nelson.
Lock removed from {un,}register_die_notifier. notifier_chain_register()
already takes a lock. Also the generic notifier chain locking is being
reworked to distinguish between callbacks that can block and those that
cannot, the lock in {un,}register_die_notifier would interfere with
that change. http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
Leading white space removed from arch/ia64/kernel/kprobes.c.
Typo in mca.c in original version of this patch found & fixed by Dean
Nelson.
Signed-off-by: Keith Owens <kaos@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Acked-by: Anil Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-07 22:27:13 +03:00
|
|
|
DIE_MACHINE_HALT,
|
|
|
|
DIE_MACHINE_RESTART,
|
|
|
|
DIE_MCA_MONARCH_ENTER,
|
|
|
|
DIE_MCA_MONARCH_PROCESS,
|
|
|
|
DIE_MCA_MONARCH_LEAVE,
|
|
|
|
DIE_MCA_SLAVE_ENTER,
|
|
|
|
DIE_MCA_SLAVE_PROCESS,
|
|
|
|
DIE_MCA_SLAVE_LEAVE,
|
|
|
|
DIE_MCA_RENDZVOUS_ENTER,
|
|
|
|
DIE_MCA_RENDZVOUS_PROCESS,
|
|
|
|
DIE_MCA_RENDZVOUS_LEAVE,
|
|
|
|
DIE_INIT_MONARCH_ENTER,
|
|
|
|
DIE_INIT_MONARCH_PROCESS,
|
|
|
|
DIE_INIT_MONARCH_LEAVE,
|
|
|
|
DIE_INIT_SLAVE_ENTER,
|
|
|
|
DIE_INIT_SLAVE_PROCESS,
|
|
|
|
DIE_INIT_SLAVE_LEAVE,
|
|
|
|
DIE_KDEBUG_ENTER,
|
|
|
|
DIE_KDEBUG_LEAVE,
|
|
|
|
DIE_KDUMP_ENTER,
|
|
|
|
DIE_KDUMP_LEAVE,
|
2005-06-23 11:09:27 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline int notify_die(enum die_val val, char *str, struct pt_regs *regs,
|
|
|
|
long err, int trap, int sig)
|
|
|
|
{
|
|
|
|
struct die_args args = {
|
|
|
|
.regs = regs,
|
|
|
|
.str = str,
|
|
|
|
.err = err,
|
|
|
|
.trapnr = trap,
|
|
|
|
.signr = sig
|
|
|
|
};
|
|
|
|
|
|
|
|
return notifier_call_chain(&ia64die_chain, val, &args);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|