W1: ds2490.c reset ds2490 in init
[linux-2.6/mini2440.git] / include / linux / crash_dump.h
blob025e4f5751034ac15139a704a63941a0f1d6dbce
1 #ifndef LINUX_CRASH_DUMP_H
2 #define LINUX_CRASH_DUMP_H
4 #ifdef CONFIG_CRASH_DUMP
5 #include <linux/kexec.h>
6 #include <linux/smp_lock.h>
7 #include <linux/device.h>
8 #include <linux/proc_fs.h>
10 #define ELFCORE_ADDR_MAX (-1ULL)
12 #ifdef CONFIG_PROC_VMCORE
13 extern unsigned long long elfcorehdr_addr;
14 #else
15 static const unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
16 #endif
18 extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
19 unsigned long, int);
20 extern const struct file_operations proc_vmcore_operations;
21 extern struct proc_dir_entry *proc_vmcore;
23 /* Architecture code defines this if there are other possible ELF
24 * machine types, e.g. on bi-arch capable hardware. */
25 #ifndef vmcore_elf_check_arch_cross
26 #define vmcore_elf_check_arch_cross(x) 0
27 #endif
29 #define vmcore_elf_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
31 static inline int is_kdump_kernel(void)
33 return (elfcorehdr_addr != ELFCORE_ADDR_MAX) ? 1 : 0;
35 #else /* !CONFIG_CRASH_DUMP */
36 static inline int is_kdump_kernel(void) { return 0; }
37 #endif /* CONFIG_CRASH_DUMP */
39 extern unsigned long saved_max_pfn;
40 #endif /* LINUX_CRASHDUMP_H */