]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
swiotlb: Keep offset in a page strictly smaller than PAGE_SIZE.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 9 Jul 2007 19:00:19 +0000 (20:00 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 9 Jul 2007 19:00:19 +0000 (20:00 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
arch/i386/kernel/swiotlb.c

index abfbc212a4f1c5e7807eeb8cb6b4fa72f6fe5298..dc03ca5c21adf198dd25e592cd9d57bd5cf62f44 100644 (file)
@@ -380,7 +380,7 @@ map_single(struct device *hwdev, struct phys_addr buffer, size_t size, int dir)
        for (i = 0; i < nslots; i++) {
                io_tlb_orig_addr[index+i] = slot_buf;
                slot_buf.offset += 1 << IO_TLB_SHIFT;
-               if (slot_buf.offset > PAGE_SIZE) {
+               if (slot_buf.offset >= PAGE_SIZE) {
                        slot_buf.page++;
                        slot_buf.offset -= PAGE_SIZE;
                }