Commit 2a7326b5bbafac4c96bcdb944b2a773593030b96

Authored by Christoph Lameter
Committed by Linus Torvalds
1 parent 8314418629

CONFIG_BOUNCE to avoid useless inclusion of bounce buffer logic

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>

Showing 3 changed files with 6 additions and 4 deletions Side-by-side Diff

include/linux/blkdev.h
... ... @@ -624,7 +624,7 @@
624 624 */
625 625 #define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
626 626  
627   -#ifdef CONFIG_MMU
  627 +#ifdef CONFIG_BOUNCE
628 628 extern int init_emergency_isa_pool(void);
629 629 extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
630 630 #else
... ... @@ -163,6 +163,10 @@
163 163 default "0" if !ZONE_DMA
164 164 default "1"
165 165  
  166 +config BOUNCE
  167 + def_bool y
  168 + depends on BLOCK && MMU && (ZONE_DMA || HIGHMEM)
  169 +
166 170 config NR_QUICK
167 171 int
168 172 depends on QUICKLIST
... ... @@ -13,9 +13,7 @@
13 13 prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
14 14 $(mmu-y)
15 15  
16   -ifeq ($(CONFIG_MMU)$(CONFIG_BLOCK),yy)
17   -obj-y += bounce.o
18   -endif
  16 +obj-$(CONFIG_BOUNCE) += bounce.o
19 17 obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o thrash.o
20 18 obj-$(CONFIG_HUGETLBFS) += hugetlb.o
21 19 obj-$(CONFIG_NUMA) += mempolicy.o