]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bounce: allow use of bounce pool via config option
authorChris Metcalf <cmetcalf@tilera.com>
Sat, 16 Jun 2012 20:41:05 +0000 (16:41 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Wed, 18 Jul 2012 20:40:35 +0000 (16:40 -0400)
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>
arch/tile/Kconfig
mm/bounce.c

index cf4bb69ea8e5db0271c643a67b5782e3412262a4..932e4430f7f3323ef9be06d2f4b1f8ac98ae611f 100644 (file)
@@ -406,6 +406,12 @@ config TILE_USB
          Provides USB host adapter support for the built-in EHCI and OHCI
          interfaces on TILE-Gx chips.
 
+# USB OHCI needs the bounce pool since tilegx will often have more
+# than 4GB of memory, but we don't currently use the IOTLB to present
+# a 32-bit address to OHCI.  So we need to use a bounce pool instead.
+config NEED_BOUNCE_POOL
+       def_bool USB_OHCI_HCD
+
 config HOTPLUG
        bool "Support for hot-pluggable devices"
        ---help---
index d1be02ca18898df63e705504395463b733639ddb..0420867755615d4f78be0272caf87e8d5b0fb112 100644 (file)
 
 static mempool_t *page_pool, *isa_page_pool;
 
-#ifdef CONFIG_HIGHMEM
+#if defined(CONFIG_HIGHMEM) || defined(CONFIG_NEED_BOUNCE_POOL)
 static __init int init_emergency_pool(void)
 {
-#ifndef CONFIG_MEMORY_HOTPLUG
+#if defined(CONFIG_HIGHMEM) && !defined(CONFIG_MEMORY_HOTPLUG)
        if (max_pfn <= max_low_pfn)
                return 0;
 #endif
 
        page_pool = mempool_create_page_pool(POOL_SIZE, 0);
        BUG_ON(!page_pool);
-       printk("highmem bounce pool size: %d pages\n", POOL_SIZE);
+       printk("bounce pool size: %d pages\n", POOL_SIZE);
 
        return 0;
 }
 
 __initcall(init_emergency_pool);
+#endif
 
+#ifdef CONFIG_HIGHMEM
 /*
  * highmem version, map in to vec
  */