Skip to content

Commit f100625

Browse files
bounce: allow use of bounce pool via config option
The tilegx USB OHCI support needs the bounce pool since we're not using the IOMMU to handle 32-bit addresses. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
1 parent 47fc28b commit f100625

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

arch/tile/Kconfig

+6
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,12 @@ config TILE_USB
406406
Provides USB host adapter support for the built-in EHCI and OHCI
407407
interfaces on TILE-Gx chips.
408408

409+
# USB OHCI needs the bounce pool since tilegx will often have more
410+
# than 4GB of memory, but we don't currently use the IOTLB to present
411+
# a 32-bit address to OHCI. So we need to use a bounce pool instead.
412+
config NEED_BOUNCE_POOL
413+
def_bool USB_OHCI_HCD
414+
409415
config HOTPLUG
410416
bool "Support for hot-pluggable devices"
411417
---help---

mm/bounce.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,25 @@
2424

2525
static mempool_t *page_pool, *isa_page_pool;
2626

27-
#ifdef CONFIG_HIGHMEM
27+
#if defined(CONFIG_HIGHMEM) || defined(CONFIG_NEED_BOUNCE_POOL)
2828
static __init int init_emergency_pool(void)
2929
{
30-
#ifndef CONFIG_MEMORY_HOTPLUG
30+
#if defined(CONFIG_HIGHMEM) && !defined(CONFIG_MEMORY_HOTPLUG)
3131
if (max_pfn <= max_low_pfn)
3232
return 0;
3333
#endif
3434

3535
page_pool = mempool_create_page_pool(POOL_SIZE, 0);
3636
BUG_ON(!page_pool);
37-
printk("highmem bounce pool size: %d pages\n", POOL_SIZE);
37+
printk("bounce pool size: %d pages\n", POOL_SIZE);
3838

3939
return 0;
4040
}
4141

4242
__initcall(init_emergency_pool);
43+
#endif
4344

45+
#ifdef CONFIG_HIGHMEM
4446
/*
4547
* highmem version, map in to vec
4648
*/

0 commit comments

Comments
 (0)