User: Password:
|
|
Subscribe / Log in / New account

x86_64: 2.6.14-rc4 swiotlb broken

From:  Ravikiran G Thirumalai <kiran-AT-scalex86.org>
To:  ak-AT-suse.de
Subject:  x86_64: 2.6.14-rc4 swiotlb broken
Date:  Mon, 17 Oct 2005 02:36:54 -0700
Cc:  linux-kernel-AT-vger.kernel.org, discuss-AT-x86-64.org, Andrew Morton <akpm-AT-osdl.org>, tglx-AT-linutronix.de, Linus Torvalds <torvalds-AT-osdl.org>, "Shai Fultheim (Shai-AT-scalex86.org)" <shai-AT-scalex86.org>
Archive-link:  Article, Thread

On x86_64 NUMA boxes, the revert
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/li...
meant that swiotlb gets the IOTLB
memory from pages over 4G (if mem > 4G), which basically renders swiotlb useless, causing
breakage with devices not capable of DMA beyond 4G.  2.6.13 was (kinda) not
broken, although the patch titled "Reverse order of bootmem lists" was
not in 2.6.13, The reason is commit
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-...
was not in 2.6.13, PCI_DMA_BUS_IS_PHYS was 1 when no mmu was present, and the block layer did 
the bouncing, never using swiotlb.  I guess the right fix is to make sure
swiotlb gets the right memory.  Here is a patch doing that.  Tested on IBM
x460.  I hope the patch is ok for ia64s too.  I do not have access to ia64
boxen.

Thanks,
Kiran

Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
 
Index: linux-2.6.14-rc4/arch/ia64/lib/swiotlb.c
===================================================================
--- linux-2.6.14-rc4.orig/arch/ia64/lib/swiotlb.c	2005-10-14 00:06:21.000000000 -0700
+++ linux-2.6.14-rc4/arch/ia64/lib/swiotlb.c	2005-10-17 00:05:22.000000000 -0700
@@ -123,7 +123,7 @@
 	/*
 	 * Get IO TLB memory from the low pages
 	 */
-	io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs *
+	io_tlb_start = alloc_bootmem_node(NODE_DATA(0), io_tlb_nslabs *
 					       (1 << IO_TLB_SHIFT));
 	if (!io_tlb_start)
 		panic("Cannot allocate SWIOTLB buffer");


(Log in to post comments)


Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds