pch_gbe: Do not abort probe on bad MAC
[linux-flexiantxendom0.git] / mm / bounce.c
index 8dcd431..4e9ae72 100644 (file)
@@ -4,8 +4,9 @@
  */
 
 #include <linux/mm.h>
-#include <linux/module.h>
+#include <linux/export.h>
 #include <linux/swap.h>
+#include <linux/gfp.h>
 #include <linux/bio.h>
 #include <linux/pagemap.h>
 #include <linux/mempool.h>
 #include <linux/init.h>
 #include <linux/hash.h>
 #include <linux/highmem.h>
-#include <linux/blktrace_api.h>
-#include <trace/block.h>
+#include <linux/bootmem.h>
 #include <asm/tlbflush.h>
 
+#include <trace/events/block.h>
+
 #define POOL_SIZE      64
 #define ISA_POOL_SIZE  16
 
 static mempool_t *page_pool, *isa_page_pool;
 
-DEFINE_TRACE(block_bio_bounce);
-
 #ifdef CONFIG_HIGHMEM
 static __init int init_emergency_pool(void)
 {
-       struct sysinfo i;
-       si_meminfo(&i);
-       si_swapinfo(&i);
-
-       if (!i.totalhigh)
+#ifndef 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);
@@ -117,8 +115,8 @@ static void copy_to_high_bio_irq(struct bio *to, struct bio *from)
                 */
                vfrom = page_address(fromvec->bv_page) + tovec->bv_offset;
 
-               flush_dcache_page(tovec->bv_page);
                bounce_copy_vec(tovec, vfrom);
+               flush_dcache_page(tovec->bv_page);
        }
 }