]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
CONFIG_BOUNCE to avoid useless inclusion of bounce buffer logic
authorChristoph Lameter <clameter@sgi.com>
Tue, 17 Jul 2007 11:03:37 +0000 (04:03 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:02 +0000 (10:23 -0700)
The bounce buffer logic is included on systems that do not need it.  If a
system does not have zones like ZONE_DMA and ZONE_HIGHMEM that can lead to
the use of bounce buffers then there is no need to reserve memory pools etc
etc.  This is true f.e.  for SGI Altix.

Also nicifies the Makefile and gets rid of the tricky "and" there.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/blkdev.h
mm/Kconfig
mm/Makefile

index b32564a1e105c4220d14d988e6530a141b46be76..f78965fc6426f61e93c91ed729ea246c011f235c 100644 (file)
@@ -624,7 +624,7 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn;
  */
 #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
 
-#ifdef CONFIG_MMU
+#ifdef CONFIG_BOUNCE
 extern int init_emergency_isa_pool(void);
 extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
 #else
index 086af703da43345ecf47d6168ca7b84f5616d050..86187221e78fdceb4c572fb310c519ba80554fdb 100644 (file)
@@ -163,6 +163,10 @@ config ZONE_DMA_FLAG
        default "0" if !ZONE_DMA
        default "1"
 
+config BOUNCE
+       def_bool y
+       depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
+
 config NR_QUICK
        int
        depends on QUICKLIST
index a9148ea329aab01297083f9bda27515ccc2dfd5a..245e33ab00c4455893b020115b2c4bcd057456be 100644 (file)
@@ -13,9 +13,7 @@ obj-y                 := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
                           prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
                           $(mmu-y)
 
-ifeq ($(CONFIG_MMU)$(CONFIG_BLOCK),yy)
-obj-y                  += bounce.o
-endif
+obj-$(CONFIG_BOUNCE)   += bounce.o
 obj-$(CONFIG_SWAP)     += page_io.o swap_state.o swapfile.o thrash.o
 obj-$(CONFIG_HUGETLBFS)        += hugetlb.o
 obj-$(CONFIG_NUMA)     += mempolicy.o