[PATCH] x86_64: Fix off by one in e820_mapped

This allows a valid iommu placed immediately after memory to work, to be
recognized as after the last byte of memory and not overlapping it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Eric W. Biederman 2005-09-06 15:16:20 -07:00 committed by Linus Torvalds
parent a888cebe17
commit 48c8b11342

View file

@ -85,7 +85,7 @@ int __init e820_mapped(unsigned long start, unsigned long end, unsigned type)
struct e820entry *ei = &e820.map[i];
if (type && ei->type != type)
continue;
if (ei->addr >= end || ei->addr + ei->size < start)
if (ei->addr >= end || ei->addr + ei->size <= start)
continue;
return 1;
}