Linux Kernel
3.7.1
|
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/highmem.h>
#include <linux/crash_dump.h>
#include <asm/uaccess.h>
Go to the source code of this file.
Functions | |
ssize_t | copy_oldmem_page (unsigned long pfn, char *buf, size_t csize, unsigned long offset, int userbuf) |
arch_initcall (kdump_buf_page_init) | |
arch_initcall | ( | kdump_buf_page_init | ) |
ssize_t copy_oldmem_page | ( | unsigned long | pfn, |
char * | buf, | ||
size_t | csize, | ||
unsigned long | offset, | ||
int | userbuf | ||
) |
copy_oldmem_page - copy one page from "oldmem" : page frame number to be copied : target memory address for the copy; this can be in kernel address space or user address space (see ) : number of bytes to copy : offset in bytes into the page (based on pfn) to begin the copy : if set, is in user address space, use copy_to_user(), otherwise is in kernel address space, use memcpy().
Copy a page from "oldmem". For this page, there is no pte mapped in the current kernel. We stitch up a pte, similar to kmap_atomic.
Calling copy_to_user() in atomic context is not desirable. Hence first copying the data to a pre-allocated kernel page and then copying to user space in non-atomic context.
Definition at line 50 of file crash_dump_32.c.