Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pci-dma.c File Reference
#include <linux/init.h>
#include <linux/gfp.h>
#include <linux/mm.h>
#include <linux/pci.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/scatterlist.h>
#include <linux/export.h>
#include <asm/cacheflush.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include <asm/tlbflush.h>

Go to the source code of this file.

Macros

#define DBG_RES(x...)
 
#define PCXL_SEARCH_LOOP(idx, mask, size)
 
#define PCXL_FIND_FREE_MAPPING(idx, mask, size)
 
#define PCXL_FREE_MAPPINGS(idx, m, size)
 

Functions

unsigned long pcxl_alloc_range (size_t size)
 
 __initcall (pcxl_dma_init)
 

Variables

unsigned long pcxl_dma_start
 
struct hppa_dma_ops pcxl_dma_ops
 
struct hppa_dma_ops pcx_dma_ops
 

Macro Definition Documentation

#define DBG_RES (   x...)

Definition at line 52 of file pci-dma.c.

#define PCXL_FIND_FREE_MAPPING (   idx,
  mask,
  size 
)
Value:
{ \
u##size *res_ptr = (u##size *)&(pcxl_res_map[pcxl_res_hint & ~((size >> 3) - 1)]); \
u##size *res_end = (u##size *)&pcxl_res_map[pcxl_res_size]; \
PCXL_SEARCH_LOOP(idx, mask, size); \
res_ptr = (u##size *)&pcxl_res_map[0]; \
PCXL_SEARCH_LOOP(idx, mask, size); \
}

Definition at line 241 of file pci-dma.c.

#define PCXL_FREE_MAPPINGS (   idx,
  m,
  size 
)
Value:
u##size *res_ptr = (u##size *)&(pcxl_res_map[(idx) + (((size >> 3) - 1) & (~((size >> 3) - 1)))]); \
/* BUG_ON((*res_ptr & m) != m); */ \
*res_ptr &= ~m;

Definition at line 297 of file pci-dma.c.

#define PCXL_SEARCH_LOOP (   idx,
  mask,
  size 
)
Value:
for(; res_ptr < res_end; ++res_ptr) \
{ \
if(0 == ((*res_ptr) & mask)) { \
*res_ptr |= mask; \
idx = (int)((u_long)res_ptr - (u_long)pcxl_res_map); \
pcxl_res_hint = idx + (size >> 3); \
goto resource_found; \
} \
}

Definition at line 230 of file pci-dma.c.

Function Documentation

__initcall ( pcxl_dma_init  )
unsigned long pcxl_alloc_range ( size_t  size)

Definition at line 250 of file pci-dma.c.

Variable Documentation

struct hppa_dma_ops pcx_dma_ops
Initial value:
= {
.dma_supported = pa11_dma_supported,
.alloc_consistent = fail_alloc_consistent,
.alloc_noncoherent = pa11_dma_alloc_noncoherent,
.free_consistent = pa11_dma_free_noncoherent,
.map_single = pa11_dma_map_single,
.unmap_single = pa11_dma_unmap_single,
.map_sg = pa11_dma_map_sg,
.unmap_sg = pa11_dma_unmap_sg,
.dma_sync_single_for_cpu = pa11_dma_sync_single_for_cpu,
.dma_sync_single_for_device = pa11_dma_sync_single_for_device,
.dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu,
.dma_sync_sg_for_device = pa11_dma_sync_sg_for_device,
}

Definition at line 583 of file pci-dma.c.

struct hppa_dma_ops pcxl_dma_ops
Initial value:
= {
.dma_supported = pa11_dma_supported,
.alloc_consistent = pa11_dma_alloc_consistent,
.alloc_noncoherent = pa11_dma_alloc_consistent,
.free_consistent = pa11_dma_free_consistent,
.map_single = pa11_dma_map_single,
.unmap_single = pa11_dma_unmap_single,
.map_sg = pa11_dma_map_sg,
.unmap_sg = pa11_dma_unmap_sg,
.dma_sync_single_for_cpu = pa11_dma_sync_single_for_cpu,
.dma_sync_single_for_device = pa11_dma_sync_single_for_device,
.dma_sync_sg_for_cpu = pa11_dma_sync_sg_for_cpu,
.dma_sync_sg_for_device = pa11_dma_sync_sg_for_device,
}

Definition at line 543 of file pci-dma.c.

unsigned long pcxl_dma_start