]> git.hungrycats.org Git - linux/commit
[IA64] various issues in the IA64 swiotlb code
authorAndi Kleen <ak@suse.de>
Tue, 17 Aug 2004 22:56:10 +0000 (22:56 +0000)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Tue, 17 Aug 2004 22:56:10 +0000 (22:56 +0000)
commitde9b29d1de2ade882c5c16c0fdbf1f6008e0530f
tree5d51ea1479f1f0d11acd08371fb127bdb8c0d3a1
parentc0b6a707711962ff09a5033466d0cee8dc9b87d3
[IA64] various issues in the IA64 swiotlb code

The biggest change is better overflow handling, partly ported from the AMD64
IOMMU  code.  This is important for some 3d drivers who make use of this and can
map a lot of memory.

First it increases the default memory usage of swiotlb to 64MB.
This was the value used in production systems in 2.4 (e.g. in SLES8) and the default
was far too small.  Note this is only allocated when the swiotlb is needed.

pci_map_single will not panic anymore on an overflow. Instead it returns
a pointer to a scratch area and allows the caller to check using
dma_mapping_error(). It still panics when the overflow buffer is exceeded.

dma_mapping_error support is implemented.

pci_map_sg will never panic now, but just return 0. Near all callers
of it seem to have proper error checking for this (IDE will even handle
it without erroring out)

The handling of passing a NULL device is improved, previously it would
never map in this case. i386 and other architectures assume NULL means a 4GB
limit instead.   This code does this now too.

I added support for swiotlb=force for easier testing.

Patch supplied by Andi Kleen & Suresh Siddha

Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/lib/swiotlb.c