lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectabout sanitize_e820_map()
From

Good evening.
I am Toshiyuki Ishii at Kurashiki in Japan.

I am a beginner of kernel source code,
so sorry if I am misunderstanding.

In sanitize_e820_map(),
When sorting change_point[] by address and swapping
two maps that represets the same memory region
and have a different address, end address for privious change_point
and start address for current change_point,
"if" statement is

if ((change_point[i]->addr < change_point[i-1]->addr) ||

((change_point[i]->addr == change_point[i-1]->addr) &&
(change_point[i]->addr == change_point[i]->pbios->addr) &&
(change_point[i-1]->addr != change_point[i-1]->pbios->addr))

There are two conditions and I think the first one is sorting by address.
I have a qestion in the second condition.

I think second line

change_point[i]->addr == change_point[i]->pbios->addr

checks that current change_point represents start address.
and third line

change_point[i-1]->addr != change_point[i-1]->pbios->addr

checks that previous change_point represents end address.
If this "if" statement intends to swap maps for "the same" region
that match these condition, the first line should be

change_point[i]->pbios->addr == change_point[i-1]->pbios->addr

I think.

Am I wrong?

-
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: 2006-01-12 03:04    [W:0.027 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site