All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: William Lee Irwin III <wli@holomorphy.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: mem=16MB laptop testing
Date: Wed, 15 Oct 2003 15:20:54 +0200	[thread overview]
Message-ID: <20031015132054.GA840@elf.ucw.cz> (raw)
In-Reply-To: <20031015125109.GQ16158@holomorphy.com>

Hi!

> > 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;
> 			}
> 		}
> 	}
> }

Do you want to say that calculation is different, already? We should
probably make 2.5 version match 2.4 version, that's what users
expect. Who changed it and why?

							Pavel

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

  reply	other threads:[~2003-10-15 13:21 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
2003-10-15 13:20       ` Pavel Machek [this message]
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=20031015132054.GA840@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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.