vserver 1.9.3
[linux-2.6.git] / drivers / char / agp / amd64-agp.c
index 924ffc3..2e8b2ae 100644 (file)
@@ -73,7 +73,7 @@ static void amd64_tlbflush(struct agp_memory *temp)
 static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
 {
        int i, j, num_entries;
-       long tmp;
+       long long tmp;
        u32 pte;
 
        num_entries = agp_num_entries();
@@ -90,7 +90,7 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
 
        /* gatt table should be empty. */
        while (j < (pg_start + mem->page_count)) {
-               if (!PGE_EMPTY(agp_bridge, agp_bridge->gatt_table[j]))
+               if (!PGE_EMPTY(agp_bridge, readl(agp_bridge->gatt_table+j)))
                        return -EBUSY;
                j++;
        }
@@ -108,7 +108,7 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
                pte |=(tmp & 0x00000000fffff000ULL);
                pte |= GPTE_VALID | GPTE_COHERENT;
 
-               agp_bridge->gatt_table[j] = pte;
+               writel(pte, agp_bridge->gatt_table+j);
        }
        amd64_tlbflush(mem);
        return 0;
@@ -675,4 +675,4 @@ module_exit(agp_amd64_cleanup);
 
 MODULE_AUTHOR("Dave Jones <davej@codemonkey.org.uk>, Andi Kleen");
 MODULE_PARM(agp_try_unsupported, "1i");
-MODULE_LICENSE("GPL and additional rights");
+MODULE_LICENSE("GPL");