From: Andres Salomon <dilinger@debian.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c
Date: Tue, 06 Mar 2007 18:52:59 -0500 [thread overview]
Message-ID: <45EDFEDB.3000507@debian.org> (raw)
[-- 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;
next reply other threads:[~2007-03-06 23:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 23:52 Andres Salomon [this message]
2007-03-07 1:52 ` [PATCH] mm: don't use ZONE_DMA unless CONFIG_ZONE_DMA is set in setup.c Andrew Morton
2007-03-07 1:52 ` Andrew Morton
2007-03-07 4:02 ` Dave Jones
2007-03-07 4:02 ` Dave Jones
2007-03-07 4:42 ` Andres Salomon
2007-03-07 4:42 ` Andres Salomon
2007-03-07 20:25 ` Christoph Lameter
2007-03-07 20:25 ` Christoph Lameter
2007-03-07 20:38 ` Andres Salomon
2007-03-07 20:38 ` Andres Salomon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45EDFEDB.3000507@debian.org \
--to=dilinger@debian.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.