]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 25 Aug 2011 20:13:54 +0000 (16:13 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 4 Dec 2012 17:32:53 +0000 (12:32 -0500)
commitebf9d955d11c052ba82b5b5cbb6f42b039ec55be
tree091c19391dc3bd400ac6a0152f93fc1493237191
parentd2d8e179dc83a3fa89942627da1cd84e85d8a681
xen-swiotlb: When doing coherent alloc/dealloc check before swizzling the MFNs.

The process to swizzle a Machine Frame Number (MFN) is not always
necessary. Especially if we know that we actually do not have to do it.
In this patch we check the MFN against the device's coherent
DMA mask and if the requested page(s) are contingous. If it all checks
out we will just return the bus addr without doing the memory
swizzle.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit 6810df88dcfc22de267caf23eb072ffb97b3c411)
drivers/xen/swiotlb-xen.c