Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
crash_dump.c File Reference
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/crash_dump.h>
#include <asm/page.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)
 

Function Documentation

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 34 of file crash_dump.c.