Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
umem.c File Reference
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/hugetlb.h>
#include <linux/dma-attrs.h>
#include <linux/slab.h>
#include "uverbs.h"

Go to the source code of this file.

Macros

#define IB_UMEM_MAX_PAGE_CHUNK
 

Functions

struct ib_umemib_umem_get (struct ib_ucontext *context, unsigned long addr, size_t size, int access, int dmasync)
 
 EXPORT_SYMBOL (ib_umem_get)
 
void ib_umem_release (struct ib_umem *umem)
 
 EXPORT_SYMBOL (ib_umem_release)
 
int ib_umem_page_count (struct ib_umem *umem)
 
 EXPORT_SYMBOL (ib_umem_page_count)
 

Macro Definition Documentation

#define IB_UMEM_MAX_PAGE_CHUNK
Value:
((PAGE_SIZE - offsetof(struct ib_umem_chunk, page_list)) / \
((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \
(void *) &((struct ib_umem_chunk *) 0)->page_list[0]))

Definition at line 45 of file umem.c.

Function Documentation

EXPORT_SYMBOL ( ib_umem_get  )
EXPORT_SYMBOL ( ib_umem_release  )
EXPORT_SYMBOL ( ib_umem_page_count  )
struct ib_umem* ib_umem_get ( struct ib_ucontext context,
unsigned long  addr,
size_t  size,
int  access,
int  dmasync 
)
read

ib_umem_get - Pin and DMA map userspace memory. : userspace context to pin memory for : userspace virtual address to start at : length of region to pin : IB_ACCESS_xxx flags for memory being pinned : flush in-flight DMA when the memory region is written

Definition at line 78 of file umem.c.

int ib_umem_page_count ( struct ib_umem umem)

Definition at line 279 of file umem.c.

void ib_umem_release ( struct ib_umem umem)

ib_umem_release - release memory pinned with ib_umem_get : umem struct to release

Definition at line 236 of file umem.c.