From: William Lee Irwin III <wli@holomorphy.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: mem=16MB laptop testing
Date: Wed, 15 Oct 2003 05:51:09 -0700 [thread overview]
Message-ID: <20031015125109.GQ16158@holomorphy.com> (raw)
In-Reply-To: <20031015121208.GA692@elf.ucw.cz>
On Wed, Oct 15, 2003 at 02:12:08PM +0200, Pavel Machek wrote:
> I do not think this wants to be fixed. It should remain compatible
> with 2.4.X, and if it is not that's a bug [and pretty dangerous & hard
> to debug one -- if you mark something as ram which is not, you get
> real bad data corruption].
2.4:
static void __init limit_regions (unsigned long long size)
{
unsigned long long current_addr = 0;
int i;
for (i = 0; i < e820.nr_map; i++) {
if (e820.map[i].type == E820_RAM) {
current_addr = e820.map[i].addr + e820.map[i].size;
if (current_addr >= size) {
e820.map[i].size -= current_addr-size;
e820.nr_map = i + 1;
return;
}
}
}
}
2.5:
static void __init limit_regions (unsigned long long size)
{
int i;
unsigned long long current_size = 0;
for (i = 0; i < e820.nr_map; i++) {
if (e820.map[i].type == E820_RAM) {
current_size += e820.map[i].size;
if (current_size >= size) {
e820.map[i].size -= current_size-size;
e820.nr_map = i + 1;
return;
}
}
}
}
next prev parent reply other threads:[~2003-10-15 12:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 10:55 mem=16MB laptop testing William Lee Irwin III
2003-10-14 11:01 ` John Bradford
2003-10-14 11:08 ` William Lee Irwin III
2003-10-14 13:20 ` John Bradford
2003-10-14 11:56 ` Andrew Morton
2003-10-14 11:58 ` Russell King
2003-10-14 12:10 ` Andrew Morton
2003-10-14 12:18 ` Russell King
2003-10-14 12:30 ` Andrew Morton
2003-10-14 12:17 ` Anton Blanchard
2003-10-14 12:31 ` Andrew Morton
2003-10-14 12:44 ` Anton Blanchard
2003-10-14 23:40 ` Andrew Morton
2003-10-15 13:32 ` Martin Waitz
2003-10-15 17:34 ` Andrew Morton
2003-10-14 12:28 ` William Lee Irwin III
2003-10-15 12:12 ` Pavel Machek
2003-10-15 12:51 ` William Lee Irwin III [this message]
2003-10-15 13:20 ` Pavel Machek
2003-10-15 13:28 ` William Lee Irwin III
2003-10-15 13:59 ` Larry Sendlosky
2003-10-15 15:34 ` Dave Jones
2003-10-15 15:38 ` Thomas Schlichter
2003-10-15 16:06 ` Dave Jones
2003-10-15 17:45 ` Mike Dresser
2003-10-15 15:32 ` Dave Jones
2003-10-15 17:20 ` Andrew Morton
2003-10-15 0:35 ` Nick Piggin
2003-10-15 4:31 ` 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=20031015125109.GQ16158@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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