user debian-kernel@lists.debian.org usertag 415805 dkt-etch-update tag 415805 patch severity 415805 important thanks On Thu, Mar 22, 2007 at 07:26:08AM +0100, Marc Petit-Huguenin wrote: > I contacted the xen-devel mailing list, and they gave me a solution for > the problem .See this email for details: > http://lists.xensource.com/archives/html/xen-devel/2007-03/msg00874.html The attached patch should be the right one, can you confirm this? Bastian -- We'll pivot at warp 2 and bring all tubes to bear, Mr. Sulu!
diff -r d24540ecc512 arch/i386/kernel/swiotlb.c
--- a/arch/i386/kernel/swiotlb.c Tue Jan 23 23:37:22 2007 +0100
+++ b/arch/i386/kernel/swiotlb.c Thu Mar 22 10:38:34 2007 +0100
@@ -227,9 +227,12 @@ __sync_single(struct phys_addr buffer, c
char *dev, *host, *kmp;
len = size;
while (len != 0) {
+ unsigned long flags;
+
if (((bytes = len) + buffer.offset) > PAGE_SIZE)
bytes = PAGE_SIZE - buffer.offset;
- kmp = kmap_atomic(buffer.page, KM_SWIOTLB);
+ local_irq_save(flags); /* protects KM_BOUNCE_READ */
+ kmp = kmap_atomic(buffer.page, KM_BOUNCE_READ);
dev = dma_addr + size - len;
host = kmp + buffer.offset;
if (dir == DMA_FROM_DEVICE) {
@@ -237,7 +240,8 @@ __sync_single(struct phys_addr buffer, c
/* inaccessible */;
} else
memcpy(dev, host, bytes);
- kunmap_atomic(kmp, KM_SWIOTLB);
+ kunmap_atomic(kmp, KM_BOUNCE_READ);
+ local_irq_restore(flags);
len -= bytes;
buffer.page++;
buffer.offset = 0;
Attachment:
signature.asc
Description: Digital signature