vserver 1.9.3
[linux-2.6.git] / drivers / char / agp / amd64-agp.c
index 06a7ef2..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;
@@ -536,6 +536,15 @@ static struct pci_device_id agp_amd64_pci_table[] = {
        .subvendor      = PCI_ANY_ID,
        .subdevice      = PCI_ANY_ID,
        },
+       /* VIA K8T800Pro */
+       {
+       .class          = (PCI_CLASS_BRIDGE_HOST << 8),
+       .class_mask     = ~0,
+       .vendor         = PCI_VENDOR_ID_VIA,
+       .device         = PCI_DEVICE_ID_VIA_K8T800PRO_0,
+       .subvendor      = PCI_ANY_ID,
+       .subdevice      = PCI_ANY_ID,
+       },
        /* VIA K8T800 */
        {
        .class          = (PCI_CLASS_BRIDGE_HOST << 8),
@@ -554,14 +563,25 @@ static struct pci_device_id agp_amd64_pci_table[] = {
        .subvendor      = PCI_ANY_ID,
        .subdevice      = PCI_ANY_ID,
        },
+       /* VIA K8T890 */
        {
        .class          = (PCI_CLASS_BRIDGE_HOST << 8),
        .class_mask     = ~0,
        .vendor         = PCI_VENDOR_ID_VIA,
-       .device         = PCI_DEVICE_ID_VIA_8380_0,
+       .device         = PCI_DEVICE_ID_VIA_3238_0,
        .subvendor      = PCI_ANY_ID,
        .subdevice      = PCI_ANY_ID,
        },
+       /* VIA K8T800/K8M800/K8N800 */
+       {
+       .class          = (PCI_CLASS_BRIDGE_HOST << 8),
+       .class_mask     = ~0,
+       .vendor         = PCI_VENDOR_ID_VIA,
+       .device         = PCI_DEVICE_ID_VIA_838X_1,
+       .subvendor      = PCI_ANY_ID,
+       .subdevice      = PCI_ANY_ID,
+       },
+
        /* NForce3 */
        {
        .class          = (PCI_CLASS_BRIDGE_HOST << 8),
@@ -655,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");