linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c
@ 2007-03-06 23:52 Andres Salomon
  2007-03-07  1:52 ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Andres Salomon @ 2007-03-06 23:52 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

If CONFIG_ZONE_DMA is ever undefined, ZONE_DMA will also not be defined,
and setup.c won't compile.  This wraps it with an #ifdef.

Signed-off-by: Andres Salomon <dilinger@debian.org>

[-- Attachment #2: zones.patch --]
[-- Type: text/x-patch, Size: 539 bytes --]

diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 0b476e1..b69626e 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -371,8 +371,10 @@ void __init zone_sizes_init(void)
 {
 	unsigned long max_zone_pfns[MAX_NR_ZONES];
 	memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
+#ifdef CONFIG_ZONE_DMA
 	max_zone_pfns[ZONE_DMA] =
 		virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
+#endif
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 #ifdef CONFIG_HIGHMEM
 	max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-06 23:52 [PATCH] mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c Andres Salomon
2007-03-07  1:52 ` Andrew Morton
2007-03-07  4:02   ` Dave Jones
2007-03-07  4:42     ` Andres Salomon
2007-03-07 20:25       ` Christoph Lameter
2007-03-07 20:38         ` Andres Salomon

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