From: Toshiyuki Ishii <psbfan@po.harenet.ne.jp>
To: linux-kernel@vger.kernel.org
Subject: about sanitize_e820_map()
Date: Thu, 12 Jan 2006 11:02:49 +0900 (JST) [thread overview]
Message-ID: <20060112.110249.46098125.psbfan@po.harenet.ne.jp> (raw)
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?
next reply other threads:[~2006-01-12 2:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-12 2:02 Toshiyuki Ishii [this message]
2006-01-19 20:47 about sanitize_e820_map() Pallipadi, Venkatesh
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=20060112.110249.46098125.psbfan@po.harenet.ne.jp \
--to=psbfan@po.harenet.ne.jp \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).