[BK PATCH] on-chip coherent memory API for DMA

From: James Bottomley
Date: Tue Jul 06 2004 - 18:17:43 EST


This is a rollup of the previous patch I sent to the list for the
on-chip API. It's available at

bk://linux-voyager.bkbits.net/dma-declare-coherent-memory-2.6

I split the patches I sent up into the five separate areas that they
affect:

ChangeSet@xxxxxx, 2004-06-30 21:44:24-05:00, jejb@mulgrave.(none)
Convert NCR_Q720 to use dma_declare_coherent_memory

This board makes an ideal example for using the API
since it consists of 4 SCSI I/O processors and a
0.5-2MB block of memory on a single MCA card.

Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

ChangeSet@xxxxxx, 2004-06-30 21:38:34-05:00, jejb@mulgrave.(none)
Add x86 implementation of dma_declare_coherent_memory

This actually implements the API (all except for
DMA_MEMORY_INCLUDES_CHILDREN).

Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

ChangeSet@xxxxxx, 2004-06-30 21:11:14-05:00, jejb@mulgrave.(none)
Add vmalloc alignment constraints

vmalloc is used by ioremap() to get regions for
remapping I/O space. To feed these regions back
into a __get_free_pages() type memory allocator,
they are expected to have more alignment than
get_vm_area() proves. So add additional alignment
constraints for VM_IOREMAP.

Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

ChangeSet@xxxxxx, 2004-06-30 21:08:15-05:00, jejb@mulgrave.(none)
Add memory region bitmap implementations

These APIs deal with bitmaps representing contiguous
memory regions. The idea is to set, free and find
a contiguous area.

For ease of implementation (as well as to conform
to the standard requirements), the bitmaps always
return n aligned n length regions. The implementation
is also limited to BITS_PER_LONG contiguous regions.

Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

ChangeSet@xxxxxx, 2004-06-30 21:02:11-05:00, jejb@mulgrave.(none)
Add dma_declare_coherent_memory() API

This adds the description and a null prototype.

Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxx>

And the diffstat is:

Documentation/DMA-API.txt | 79 +++++++++++++++++++++++++++++
arch/i386/kernel/pci-dma.c | 111 ++++++++++++++++++++++++++++++++++++++++-
drivers/scsi/NCR_Q720.c | 21 ++++++-
include/asm-i386/dma-mapping.h | 12 ++++
include/linux/bitmap.h | 3 +
include/linux/device.h | 3 +
include/linux/dma-mapping.h | 26 +++++++++
lib/bitmap.c | 76 ++++++++++++++++++++++++++++
mm/vmalloc.c | 20 ++++++-
9 files changed, 344 insertions(+), 7 deletions(-)

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/