]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/844-swiotlb-alloc.patch
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / 844-swiotlb-alloc.patch
1 From: http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/87c84f7dd850
2 # HG changeset 844 patch
3 # User Keir Fraser <keir.fraser@citrix.com>
4 # Date 1237539658 0
5 # Node ID 87c84f7dd8507edc58c13f1debfad5a05aa03128
6 # Parent 0a9cdf1dbad6127156609dcf389afeac09081210
7 Subject: swiotlb allocations do not need to come from low memory
8 References: bnc#482614
9
10 Other than on native, where using the _low variants of alloc_bootmem()
11 is indeed a requirement for swiotlb, on Xen this is not needed. Using
12 the _low variants has the potential of preventing systems from booting
13 when they have lots of memory, due to the way the bootmem allocator
14 works: It allocates memory from bottom to top. Thus, if other large
15 (but not _low) allocations (memmap, large system hash tables)
16 mostly consume the memory below 4Gb, the swiotlb allocations can
17 fail. (This is equally so for native, but cannot be that easily fixed
18 there.)
19
20 Signed-off-by: Jan Beulich <jbeulich@novell.com>
21
22 --- sle11-2009-03-24.orig/lib/swiotlb-xen.c 2009-03-24 10:00:15.000000000 +0100
23 +++ sle11-2009-03-24/lib/swiotlb-xen.c 2009-03-20 10:00:58.000000000 +0100
24 @@ -151,7 +151,7 @@ swiotlb_init_with_default_size (size_t d
25 /*
26 * Get IO TLB memory from the low pages
27 */
28 - iotlb_virt_start = alloc_bootmem_low_pages(bytes);
29 + iotlb_virt_start = alloc_bootmem_pages(bytes);
30 if (!iotlb_virt_start)
31 panic("Cannot allocate SWIOTLB buffer!\n");
32
33 @@ -196,7 +196,7 @@ swiotlb_init_with_default_size (size_t d
34 /*
35 * Get the overflow emergency buffer
36 */
37 - io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
38 + io_tlb_overflow_buffer = alloc_bootmem(io_tlb_overflow);
39 if (!io_tlb_overflow_buffer)
40 panic("Cannot allocate SWIOTLB overflow buffer!\n");
41