From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Jeff Dike <jdike@addtoit.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [uml-devel] [PATCH 9/10] UML - Big memory fixes
Date: Tue, 1 Nov 2005 16:11:04 +0100 [thread overview]
Message-ID: <200511011611.09532.blaisorblade@yahoo.it> (raw)
In-Reply-To: <200510310439.j9V4dgqP000878@ccure.user-mode-linux.org>
On Monday 31 October 2005 05:39, Jeff Dike wrote:
> A number of fixes to improve behavior when large physical memory sizes
> are specified:
> libc files need -D_FILE_OFFSET_BITS=64 because there are unavoidable
> uses of non-64 interfaces in libc
> some %d need to be %u
>
> Signed-off-by: Jeff Dike <jdike@addtoit.com>
Jeff, please always make patch and ChangeLog match. Yes, it matters - when it
doesn't happen there's always something bad going on.
> Index: linux-2.6.14/arch/um/kernel/mem.c
> ===================================================================
> --- linux-2.6.14.orig/arch/um/kernel/mem.c 2005-10-28 12:58:12.000000000
> -0400 +++ linux-2.6.14/arch/um/kernel/mem.c 2005-10-30 19:29:04.000000000
> -0500 @@ -235,7 +235,7 @@ void paging_init(void)
> 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[3] = highmem >> PAGE_SHIFT;
> free_area_init(zones_size);
What's this? It's IMHO invalid. free_area_init() intereprets these values with
include/linux/mmzone.h: ZONE_* constants.
Why those are not used here it's a nice question.
I think this came up because there's (in -mm) Andi Kleen created a new zone
(ZONE_DMA32) for devices using 32-bit only DMA - but it seems it's not in
mainline). (I don't know if that patch is in -mm actually, but I guess it
from this patch content).
Actually, since MAX_NR_ZONES is 3, and we are assigning to zones_size[3],
we're corrupting data:
unsigned long zones_size[MAX_NR_ZONES], vaddr;
Don't drop the patch however, I'm fixing all this up.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Messenger: chiamate gratuite in tutto il mondo
http://it.messenger.yahoo.com
next prev parent reply other threads:[~2005-11-01 15:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 4:39 Jeff Dike
2005-11-01 15:11 ` Blaisorblade [this message]
2005-11-01 17:06 ` [uml-devel] " Jeff Dike
2005-11-01 20:37 ` [PATCH] uml: fix hardcoded ZONE_* constants in zone setup Paolo 'Blaisorblade' Giarrusso
2005-11-04 22:46 ` 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=200511011611.09532.blaisorblade@yahoo.it \
--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
Powered by JetHome