Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6

* 'stable/xen-swiotlb.bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6:
swiotlb: Export swioltb_nr_tbl and utilize it as appropiate.

+14 -2
+8 -2
drivers/xen/swiotlb-xen.c
··· 147 147 { 148 148 unsigned long bytes; 149 149 int rc; 150 + unsigned long nr_tbl; 150 151 151 - xen_io_tlb_nslabs = (64 * 1024 * 1024 >> IO_TLB_SHIFT); 152 - xen_io_tlb_nslabs = ALIGN(xen_io_tlb_nslabs, IO_TLB_SEGSIZE); 152 + nr_tbl = swioltb_nr_tbl(); 153 + if (nr_tbl) 154 + xen_io_tlb_nslabs = nr_tbl; 155 + else { 156 + xen_io_tlb_nslabs = (64 * 1024 * 1024 >> IO_TLB_SHIFT); 157 + xen_io_tlb_nslabs = ALIGN(xen_io_tlb_nslabs, IO_TLB_SEGSIZE); 158 + } 153 159 154 160 bytes = xen_io_tlb_nslabs << IO_TLB_SHIFT; 155 161
+1
include/linux/swiotlb.h
··· 24 24 25 25 extern void swiotlb_init(int verbose); 26 26 extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); 27 + extern unsigned long swioltb_nr_tbl(void); 27 28 28 29 /* 29 30 * Enumeration for sync targets
+5
lib/swiotlb.c
··· 110 110 __setup("swiotlb=", setup_io_tlb_npages); 111 111 /* make io_tlb_overflow tunable too? */ 112 112 113 + unsigned long swioltb_nr_tbl(void) 114 + { 115 + return io_tlb_nslabs; 116 + } 117 + 113 118 /* Note that this doesn't work with highmem page */ 114 119 static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, 115 120 volatile void *address)