2 * include/asm-x86_64/diskdump.h
4 * Copyright (C) Hitachi, Ltd. 2004
5 * Written by Satoshi Oshima (oshima@sdl.hitachi.co.jp)
7 * Derived from include/asm-i386/diskdump.h
8 * Copyright (c) 2004 FUJITSU LIMITED
9 * Copyright (c) 2003 Red Hat, Inc. All rights reserved.
13 #ifndef _ASM_X86_64_DISKDUMP_H
14 #define _ASM_X86_64_DISKDUMP_H
18 #include <linux/elf.h>
19 #include <asm/crashdump.h>
21 const static int platform_supports_diskdump = 1;
23 struct disk_dump_sub_header {
24 elf_gregset_t elf_regs;
27 #define size_of_sub_header() ((sizeof(struct disk_dump_sub_header) + PAGE_SIZE - 1) / DUMP_BLOCK_SIZE)
29 #define write_sub_header() \
33 ELF_CORE_COPY_REGS(dump_sub_header.elf_regs, (&myregs)); \
34 clear_page(scratch); \
35 memcpy(scratch, &dump_sub_header, sizeof(dump_sub_header)); \
37 if ((ret = write_blocks(dump_part, 2, scratch, 1)) >= 0) \
38 ret = 1; /* size of sub header in page */; \
42 #endif /* __KERNEL__ */
44 #endif /* _ASM_X86_64_DISKDUMP_H */