ia64/xen-unstable
changeset 4129:5badd947172d
bitkeeper revision 1.1236.29.1 (423473c16t30SQy1wWe3VG5fgnCn0Q)
Linux panic now calls HYPERVISOR_crash()
Signed-off-by: ian@xensource.com
Linux panic now calls HYPERVISOR_crash()
Signed-off-by: ian@xensource.com
author | iap10@freefall.cl.cam.ac.uk |
---|---|
date | Sun Mar 13 17:09:21 2005 +0000 (2005-03-13) |
parents | e29a885e4d0b |
children | e76dec027ccb |
files | linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c |
line diff
1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c Sun Mar 13 09:42:55 2005 +0000 1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c Sun Mar 13 17:09:21 2005 +0000 1.3 @@ -41,6 +41,7 @@ 1.4 #include <linux/init.h> 1.5 #include <linux/edd.h> 1.6 #include <linux/percpu.h> 1.7 +#include <linux/notifier.h> 1.8 #include <video/edid.h> 1.9 #include <asm/e820.h> 1.10 #include <asm/mpspec.h> 1.11 @@ -57,6 +58,15 @@ 1.12 /* Allows setting of maximum possible memory size */ 1.13 static unsigned long xen_override_max_pfn; 1.14 1.15 +extern struct notifier_block *panic_notifier_list; 1.16 +static int xen_panic_event(struct notifier_block *, unsigned long, void *); 1.17 +static struct notifier_block xen_panic_block = { 1.18 + xen_panic_event, 1.19 + NULL, 1.20 + 0 /* try to go last */ 1.21 +}; 1.22 + 1.23 + 1.24 int disable_pse __initdata = 0; 1.25 1.26 /* 1.27 @@ -1398,6 +1408,9 @@ void __init setup_arch(char **cmdline_p) 1.28 if ( panic_timeout == 0 ) 1.29 panic_timeout = 1; 1.30 1.31 + /* Register a call for panic conditions. */ 1.32 + notifier_chain_register(&panic_notifier_list, &xen_panic_block); 1.33 + 1.34 HYPERVISOR_vm_assist(VMASST_CMD_enable, 1.35 VMASST_TYPE_4gb_segments); 1.36 1.37 @@ -1598,6 +1611,16 @@ void __init setup_arch(char **cmdline_p) 1.38 } 1.39 } 1.40 1.41 + 1.42 +static int 1.43 +xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) 1.44 +{ 1.45 + HYPERVISOR_crash(); 1.46 + /* we're never actually going to get here... */ 1.47 + return NOTIFY_DONE; 1.48 +} 1.49 + 1.50 + 1.51 #include "setup_arch_post.h" 1.52 /* 1.53 * Local Variables: