FreeBSD kernel kern code
subr_busdma_bufalloc.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/busdma_bufalloc.h>
#include <sys/malloc.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/vm_kern.h>
#include <vm/uma.h>
Include dependency graph for subr_busdma_bufalloc.c:

Go to the source code of this file.

Data Structures

struct  busdma_bufalloc
 

Macros

#define MIN_ZONE_BUFSIZE   32
 
#define MAX_ZONE_BUFSIZE   PAGE_SIZE
 

Functions

 __FBSDID ("$BSDSUniX$")
 
busdma_bufalloc_t busdma_bufalloc_create (const char *name, bus_size_t minimum_alignment, uma_alloc alloc_func, uma_free free_func, u_int32_t zcreate_flags)
 
void busdma_bufalloc_destroy (busdma_bufalloc_t ba)
 
struct busdma_bufzone * busdma_bufalloc_findzone (busdma_bufalloc_t ba, bus_size_t size)
 
void * busdma_bufalloc_alloc_uncacheable (uma_zone_t zone, int size, u_int8_t *pflag, int wait)
 
void busdma_bufalloc_free_uncacheable (void *item, int size, u_int8_t pflag)
 

Macro Definition Documentation

#define MAX_ZONE_BUFSIZE   PAGE_SIZE

Definition at line 53 of file subr_busdma_bufalloc.c.

Referenced by busdma_bufalloc_create(), and busdma_bufalloc_findzone().

#define MIN_ZONE_BUFSIZE   32

Definition at line 52 of file subr_busdma_bufalloc.c.

Referenced by busdma_bufalloc_create().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void* busdma_bufalloc_alloc_uncacheable ( uma_zone_t  zone,
int  size,
u_int8_t *  pflag,
int  wait 
)

Definition at line 150 of file subr_busdma_bufalloc.c.

References panic().

Here is the call graph for this function:

busdma_bufalloc_t busdma_bufalloc_create ( const char *  name,
bus_size_t  minimum_alignment,
uma_alloc  alloc_func,
uma_free  free_func,
u_int32_t  zcreate_flags 
)
void busdma_bufalloc_destroy ( busdma_bufalloc_t  ba)

Definition at line 117 of file subr_busdma_bufalloc.c.

References free().

Referenced by busdma_bufalloc_create().

Here is the call graph for this function:

Here is the caller graph for this function:

struct busdma_bufzone* busdma_bufalloc_findzone ( busdma_bufalloc_t  ba,
bus_size_t  size 
)

Definition at line 133 of file subr_busdma_bufalloc.c.

References MAX_ZONE_BUFSIZE, and panic().

Here is the call graph for this function:

void busdma_bufalloc_free_uncacheable ( void *  item,
int  size,
u_int8_t  pflag 
)

Definition at line 169 of file subr_busdma_bufalloc.c.