From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Dike <jdike@addtoit.com>,
linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH] uml: fix hardcoded ZONE_* constants in zone setup
Date: Tue, 01 Nov 2005 21:37:21 +0100 [thread overview]
Message-ID: <20051101203721.26156.11021.stgit@zion.home.lan> (raw)
In-Reply-To: <20051101170633.GB6448@ccure.user-mode-linux.org>
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Remove usage of hardcoded constants in paging_init().
By chance I spotted a bug in zones_setup involving a change to ZONE_* constants,
due to the ZONE_DMA32 patch from Andi Kleen (which is in -mm). So, possibly,
instead of zones_size[2] you will find zones_size[3] in the code, but that
change is wrong and this patch is still correct.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
arch/um/kernel/mem.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -234,8 +234,8 @@ void paging_init(void)
empty_bad_page = (unsigned long *) alloc_bootmem_low_pages(PAGE_SIZE);
for(i=0;i<sizeof(zones_size)/sizeof(zones_size[0]);i++)
zones_size[i] = 0;
- zones_size[0] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT);
- zones_size[2] = highmem >> PAGE_SHIFT;
+ zones_size[ZONE_DMA] = (end_iomem >> PAGE_SHIFT) - (uml_physmem >> PAGE_SHIFT);
+ zones_size[ZONE_HIGHMEM] = highmem >> PAGE_SHIFT;
free_area_init(zones_size);
/*
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2005-11-01 20:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 4:39 [uml-devel] [PATCH 9/10] UML - Big memory fixes Jeff Dike
2005-11-01 15:11 ` Blaisorblade
2005-11-01 17:06 ` Jeff Dike
2005-11-01 20:37 ` Paolo 'Blaisorblade' Giarrusso [this message]
2005-11-04 22:46 ` [uml-devel] Re: [PATCH] uml: fix hardcoded ZONE_* constants in zone setup Andrew Morton
2005-11-04 23:21 ` Blaisorblade
2005-11-04 23:26 ` Andrew Morton
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=20051101203721.26156.11021.stgit@zion.home.lan \
--to=blaisorblade@yahoo.it \
--cc=akpm@osdl.org \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox