fedora core 2.6.9-1.11-FC2
[linux-2.6.git] / include / asm-ppc64 / crashdump.h
1 #ifndef _ASM_PPC64_CRASHDUMP_H
2 #define _ASM_PPC64_CRASHDUMP_H
3
4 /*
5  * linux/include/asm-ppc64/crashdump.h
6  *
7  * Copyright (c) 2003, 2004 Red Hat, Inc. All rights reserved.
8  * Copyright (C) 2004 IBM Corp.
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 <asm/time.h>
29
30 extern int page_is_ram (unsigned long);
31 extern unsigned long next_ram_page (unsigned long);
32
33 #define platform_timestamp(x) (x = get_tb())
34
35 #define platform_fix_regs()                                             \
36 {                                                                       \
37        memcpy(&myregs, regs, sizeof(struct pt_regs));                   \
38 };
39
40 #define platform_init_stack(stackptr) do { } while (0)
41 #define platform_cleanup_stack(stackptr) do { } while (0)
42
43 typedef asmlinkage void (*crashdump_func_t)(struct pt_regs *, void *);
44
45 static inline void platform_start_crashdump(void *stackptr,
46                                            crashdump_func_t dumpfunc,
47                                            struct pt_regs *regs)
48 {
49         dumpfunc(regs, NULL);
50 }
51
52 #define platform_freeze_cpu()                                   \
53 {                                                               \
54         current->thread.ksp = __get_SP();                       \
55         for (;;) local_irq_disable();                           \
56 }
57
58
59 #endif /* __KERNEL__ */
60
61 #endif /* _ASM_PPC64_CRASHDUMP_H */