aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mm
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2005-06-25 17:58:19 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:53 -0400
commit60e64d46a58236e3c718074372cab6a5b56a3b15 (patch)
tree194e5fa7a53a1ac4a106b1527ec69cf3c2179bb0 /arch/i386/mm
parent5f016456c96868c27df248a54d1cc919e7b70a23 (diff)
[PATCH] kdump: Routines for copying dump pages
This patch provides the interfaces necessary to read the dump contents, treating it as a high memory device. Signed off by Hariprasad Nellitheertha <hari@in.ibm.com> Signed-off-by: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/mm')
-rw-r--r--arch/i386/mm/highmem.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c
index 4b7aaf99d7ea..b6eb4dcb8777 100644
--- a/arch/i386/mm/highmem.c
+++ b/arch/i386/mm/highmem.c
@@ -75,6 +75,24 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
75 preempt_check_resched(); 75 preempt_check_resched();
76} 76}
77 77
78/* This is the same as kmap_atomic() but can map memory that doesn't
79 * have a struct page associated with it.
80 */
81void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
82{
83 enum fixed_addresses idx;
84 unsigned long vaddr;
85
86 inc_preempt_count();
87
88 idx = type + KM_TYPE_NR*smp_processor_id();
89 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
90 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot));
91 __flush_tlb_one(vaddr);
92
93 return (void*) vaddr;
94}
95
78struct page *kmap_atomic_to_page(void *ptr) 96struct page *kmap_atomic_to_page(void *ptr)
79{ 97{
80 unsigned long idx, vaddr = (unsigned long)ptr; 98 unsigned long idx, vaddr = (unsigned long)ptr;