1 #ifndef _ASM_IA64_DISKDUMP_H
2 #define _ASM_IA64_DISKDUMP_H
5 * linux/include/asm-ia64/diskdump.h
7 * Copyright (c) 2004 FUJITSU LIMITED
8 * Copyright (c) 2003 Red Hat, Inc. All rights reserved.
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)
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.
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.
28 #include <asm/crashdump.h>
31 const static int platform_supports_diskdump = 1;
33 struct disk_dump_sub_header {
34 elf_gregset_t elf_regs;
35 struct switch_stack *sw[NR_CPUS];
38 #define size_of_sub_header() ((sizeof(struct disk_dump_sub_header) + PAGE_SIZE - 1) / DUMP_BLOCK_SIZE)
40 #define write_sub_header() \
43 struct unw_frame_info *info = platform_arg; \
45 ia64_do_copy_regs(info, &dump_sub_header.elf_regs); \
46 dump_sub_header.sw[smp_processor_id()] = info->sw; \
47 clear_page(scratch); \
48 memcpy(scratch, &dump_sub_header, sizeof(dump_sub_header));\
50 if ((ret = write_blocks(dump_part, 2, scratch, 1)) >= 0)\
51 ret = 1; /* size of sub header in page */; \
55 #define platform_freeze_cpu() \
57 unw_init_running(ia64_freeze_cpu, \
58 &dump_sub_header.sw[smp_processor_id()]); \
61 #endif /* __KERNEL__ */
63 #endif /* _ASM_IA64_DISKDUMP_H */