]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64: Fix off by one in e820_mapped
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 6 Sep 2005 22:16:20 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:16 +0000 (16:57 -0700)
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>
arch/x86_64/kernel/e820.c

index b548dea4e5b95e30c01f369f0c95dcd06db67551..116ac5f53dced70d0098178e57b7e09207d90603 100644 (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; 
        }