1 #ifndef _ASM_I386_CRASH_H
2 #define _ASM_I386_CRASH_H
5 * linux/include/asm-i386/crash.h
7 * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <linux/highmem.h>
29 #include <asm/mmzone.h>
31 extern int page_is_ram(unsigned long);
34 map_virtual(u64 offset, struct page **pp)
40 pfn = (unsigned long)(offset >> PAGE_SHIFT);
42 if (!page_is_ram(pfn)) {
44 "crash memory driver: !page_is_ram(pfn: %lx)\n", pfn);
48 if (!pfn_valid(pfn)) {
50 "crash memory driver: invalid pfn: %lx )\n", pfn);
54 page = pfn_to_page(pfn);
59 "crash memory driver: pfn: %lx kmap(page: %lx) failed\n",
60 pfn, (unsigned long)page);
65 return (vaddr + (offset & (PAGE_SIZE-1)));
68 static inline void unmap_virtual(struct page *page)
73 #endif /* __KERNEL__ */
75 #endif /* _ASM_I386_CRASH_H */