lkml.org 
[lkml]   [2003]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mem=16MB laptop testing
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?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans