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/domainset.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 ("$FreeBSD$")
 
busdma_bufalloc_t busdma_bufalloc_create (const char *name, bus_size_t minimum_alignment, uma_alloc alloc_func, uma_free free_func, uint32_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, vm_size_t size, int domain, uint8_t *pflag, int wait)
 
void busdma_bufalloc_free_uncacheable (void *item, vm_size_t size, uint8_t pflag)
 

Macro Definition Documentation

◆ MAX_ZONE_BUFSIZE

#define MAX_ZONE_BUFSIZE   PAGE_SIZE

Definition at line 56 of file subr_busdma_bufalloc.c.

◆ MIN_ZONE_BUFSIZE

#define MIN_ZONE_BUFSIZE   32

Definition at line 55 of file subr_busdma_bufalloc.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ busdma_bufalloc_alloc_uncacheable()

void * busdma_bufalloc_alloc_uncacheable ( uma_zone_t  zone,
vm_size_t  size,
int  domain,
uint8_t *  pflag,
int  wait 
)

Definition at line 153 of file subr_busdma_bufalloc.c.

References domain, and panic().

Here is the call graph for this function:

◆ busdma_bufalloc_create()

busdma_bufalloc_t busdma_bufalloc_create ( const char *  name,
bus_size_t  minimum_alignment,
uma_alloc  alloc_func,
uma_free  free_func,
uint32_t  zcreate_flags 
)

◆ busdma_bufalloc_destroy()

void busdma_bufalloc_destroy ( busdma_bufalloc_t  ba)

Definition at line 120 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:

◆ busdma_bufalloc_findzone()

struct busdma_bufzone * busdma_bufalloc_findzone ( busdma_bufalloc_t  ba,
bus_size_t  size 
)

Definition at line 136 of file subr_busdma_bufalloc.c.

References MAX_ZONE_BUFSIZE, and panic().

Here is the call graph for this function:

◆ busdma_bufalloc_free_uncacheable()

void busdma_bufalloc_free_uncacheable ( void *  item,
vm_size_t  size,
uint8_t  pflag 
)

Definition at line 169 of file subr_busdma_bufalloc.c.