aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2007-03-20 11:36:02 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-04-27 11:20:24 -0400
commit05502339332564ffd545be9ca37b208296a2eaad (patch)
tree18ccc05807e2998ddf25b3b359d680e41ff3c06a /arch/mips
parentf197465384bf7ef1af184c2ed1a4e268911a91e3 (diff)
[MIPS] Select ZONE_DMA only if GENERIC_ISA_DMA selected
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig3
-rw-r--r--arch/mips/mm/init.c17
2 files changed, 9 insertions, 11 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index acceae0e8319..f9c4ba58d384 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -10,7 +10,6 @@ menu "Machine selection"
10 10
11config ZONE_DMA 11config ZONE_DMA
12 bool 12 bool
13 default y
14 13
15choice 14choice
16 prompt "System type" 15 prompt "System type"
@@ -923,6 +922,7 @@ config SYS_HAS_EARLY_PRINTK
923 922
924config GENERIC_ISA_DMA 923config GENERIC_ISA_DMA
925 bool 924 bool
925 select ZONE_DMA
926 926
927config I8259 927config I8259
928 bool 928 bool
@@ -946,6 +946,7 @@ config MIPS_DISABLE_OBSOLETE_IDE
946 946
947config GENERIC_ISA_DMA_SUPPORT_BROKEN 947config GENERIC_ISA_DMA_SUPPORT_BROKEN
948 bool 948 bool
949 select ZONE_DMA
949 950
950# 951#
951# Endianess selection. Sufficiently obscure so many users don't know what to 952# Endianess selection. Sufficiently obscure so many users don't know what to
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index e9951c0e689f..8800c88cbbf6 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -351,18 +351,15 @@ void __init paging_init(void)
351#endif 351#endif
352 kmap_coherent_init(); 352 kmap_coherent_init();
353 353
354#ifdef CONFIG_ISA 354#ifdef CONFIG_ZONE_DMA
355 if (max_low_pfn >= MAX_DMA_PFN) 355 if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) {
356 if (min_low_pfn >= MAX_DMA_PFN) { 356 zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
357 zones_size[ZONE_DMA] = 0; 357 zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
358 zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn; 358 } else if (max_low_pfn < MAX_DMA_PFN)
359 } else { 359 zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn;
360 zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn;
361 zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN;
362 }
363 else 360 else
364#endif 361#endif
365 zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn; 362 zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn;
366 363
367#ifdef CONFIG_HIGHMEM 364#ifdef CONFIG_HIGHMEM
368 zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; 365 zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn;