[MIPS] Select ZONE_DMA only if GENERIC_ISA_DMA selected
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Tue, 20 Mar 2007 15:36:02 +0000 (00:36 +0900)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 27 Apr 2007 15:20:24 +0000 (16:20 +0100)
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/mm/init.c

index acceae0e83194bc9e693b832fea0db08aed70e7b..f9c4ba58d384ac5a7bdd5e7378cdbffca864d1ee 100644 (file)
@@ -10,7 +10,6 @@ menu "Machine selection"
 
 config ZONE_DMA
        bool
-       default y
 
 choice
        prompt "System type"
@@ -923,6 +922,7 @@ config SYS_HAS_EARLY_PRINTK
 
 config GENERIC_ISA_DMA
        bool
+       select ZONE_DMA
 
 config I8259
        bool
@@ -946,6 +946,7 @@ config MIPS_DISABLE_OBSOLETE_IDE
 
 config GENERIC_ISA_DMA_SUPPORT_BROKEN
        bool
+       select ZONE_DMA
 
 #
 # Endianess selection.  Sufficiently obscure so many users don't know what to
index e9951c0e689f710c7e356bb821fb4ed4fb1d75f5..8800c88cbbf67f41902a43f093bf22818670b283 100644 (file)
@@ -351,18 +351,15 @@ void __init paging_init(void)
 #endif
        kmap_coherent_init();
 
-#ifdef CONFIG_ISA
-       if (max_low_pfn >= MAX_DMA_PFN)
-               if (min_low_pfn >= MAX_DMA_PFN) {
-                       zones_size[ZONE_DMA] = 0;
-                       zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
-               } else {
-                       zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
-                       zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
-               }
+#ifdef CONFIG_ZONE_DMA
+       if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) {
+               zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
+               zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
+       } else if (max_low_pfn < MAX_DMA_PFN)
+               zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
        else
 #endif
-       zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
+       zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
 
 #ifdef CONFIG_HIGHMEM
        zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;