Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] Select ZONE_DMA only if GENERIC_ISA_DMA selected
@ 2007-03-20 15:36 Atsushi Nemoto
  2007-03-20 16:02 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2007-03-20 15:36 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
 arch/mips/Kconfig   |    3 ++-
 arch/mips/mm/init.c |   17 +++++++----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 0253584..eb5c01b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -10,7 +10,6 @@ menu "Machine selection"
 
 config ZONE_DMA
 	bool
-	default y
 
 choice
 	prompt "System type"
@@ -922,6 +921,7 @@ config SYS_HAS_EARLY_PRINTK
 
 config GENERIC_ISA_DMA
 	bool
+	select ZONE_DMA
 
 config I8259
 	bool
@@ -945,6 +945,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
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index f08ae71..8768ea8 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Select ZONE_DMA only if GENERIC_ISA_DMA selected
  2007-03-20 15:36 [PATCH] Select ZONE_DMA only if GENERIC_ISA_DMA selected Atsushi Nemoto
@ 2007-03-20 16:02 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2007-03-20 16:02 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips

On Wed, Mar 21, 2007 at 12:36:02AM +0900, Atsushi Nemoto wrote:

Thanks, queued up for 2.6.22.

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-20 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 15:36 [PATCH] Select ZONE_DMA only if GENERIC_ISA_DMA selected Atsushi Nemoto
2007-03-20 16:02 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox