1 #ifndef _ASM_PPC64_NETDUMP_H_
2 #define _ASM_PPC64_NETDUMP_H_
5 * linux/include/asm-ppc64/netdump.h
7 * Copyright (c) 2003, 2004 Red Hat, Inc. All rights reserved.
8 * Copyright (C) 2004 IBM Corp.
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>
30 const static int platform_supports_netdump = 1;
32 #define platform_page_is_ram(x) (page_is_ram(x))
33 #define platform_machine_type() (EM_PPC64)
35 static inline unsigned char platform_effective_version(req_t *req)
38 return min_t(unsigned char, req->from, NETDUMP_VERSION_MAX);
43 #define platform_max_pfn() (num_physpages)
45 static inline u32 platform_next_available(unsigned long pfn)
47 unsigned long pgnum = next_ram_page(pfn);
49 if (pgnum < platform_max_pfn()) {
55 static inline void platform_jiffy_cycles(unsigned long long *jcp)
57 unsigned long long t0, t1;
59 platform_timestamp(t0);
61 platform_timestamp(t1);
66 static inline unsigned int platform_get_regs(char *tmp, struct pt_regs *myregs)
68 elf_gregset_t elf_regs;
71 tmp2 = tmp + sprintf(tmp, "Sending register info.\n");
72 ELF_CORE_COPY_REGS(elf_regs, myregs);
73 memcpy(tmp2, &elf_regs, sizeof(elf_regs));
75 return(strlen(tmp) + sizeof(elf_regs));
77 #endif /* __KERNEL__ */
79 #endif /* _ASM_PPC64_NETDUMP_H_ */