Re: [PATCH] mm,x86: fix span coverage in e820_all_mapped()

From: Yinghai Lu
Date: Tue Dec 10 2013 - 16:52:22 EST


On Tue, Dec 10, 2013 at 1:29 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> On 12/10/2013 01:06 PM, Yinghai Lu wrote:
>> On Tue, Dec 10, 2013 at 1:06 AM, Xishi Qiu <qiuxishi@xxxxxxxxxx> wrote:
>>> In the following case, e820_all_mapped() will return 1.
>>> A < start < B-1 and B < end < C, it means <start, end> spans two regions.
>>> <start, end>: [start - end]
>>> e820 addr: ...[A - B-1][B - C]...
>>
>> should be [start, end) right?
>> and
>> [A, B),[B, C)
>>
>
> What happens if it spans more than two regions?

[A, B), [B+1, C), [C+1, D) ?
start in [A, B), and end in [C+1, D).

old code:
first with [A, B), start set to B.
then with [B+1, C), start still keep as B.
then with [C+1, D), start still keep as B.
at last still return 0...aka not_all_mapped.

old code is still right.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/