This commit was generated by cvs2svn to compensate for changes in r925,
[linux-2.6.git] / include / asm-ia64 / crashdump.h
1 #ifndef _ASM_IA64_CRASHDUMP_H
2 #define _ASM_IA64_CRASHDUMP_H
3
4 /*
5  * linux/include/asm-ia64/diskdump.h
6  *
7  * Copyright (c) 2004 FUJITSU LIMITED
8  * Copyright (c) 2003 Red Hat, Inc. All rights reserved.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2, or (at your option)
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  */
25
26 #ifdef __KERNEL__
27
28 #include <linux/elf.h>
29 #include <asm/unwind.h>
30 #include <asm/ptrace.h>
31
32 extern void ia64_do_copy_regs(struct unw_frame_info *, void *arg);
33 extern void ia64_freeze_cpu(struct unw_frame_info *, void *arg);
34 extern void ia64_start_dump(struct unw_frame_info *, void *arg);
35 extern int page_is_ram(unsigned long);
36 extern unsigned long next_ram_page(unsigned long);
37
38 #define platform_timestamp(x) ({ x = ia64_get_itc(); })
39
40 #define platform_fix_regs()                                     \
41 {                                                               \
42         struct unw_frame_info *info = platform_arg;             \
43                                                                 \
44         current->thread.ksp = (__u64)info->sw - 16;             \
45         myregs = *regs;                                         \
46 }
47
48 #define platform_init_stack(stackptr) do { } while (0)
49 #define platform_cleanup_stack(stackptr) do { } while (0)
50
51 typedef asmlinkage void (*crashdump_func_t)(struct pt_regs *, void *);
52
53 /* Container to hold dump hander information */
54 struct dump_call_param {
55         crashdump_func_t func;
56         struct pt_regs  *regs;
57 };
58
59 static inline void platform_start_crashdump(void *stackptr,
60                                             crashdump_func_t dumpfunc,
61                                             struct pt_regs *regs)
62 {
63         struct dump_call_param param;
64
65         param.func = dumpfunc;
66         param.regs = regs;
67         unw_init_running(ia64_start_dump, &param);
68 }
69
70 #endif /* __KERNEL__ */
71
72 #endif /* _ASM_IA64_CRASHDUMP_H */