]> err.no Git - linux-2.6/blobdiff - drivers/char/agp/amd64-agp.c
Merge branch 'linus' into x86/nmi
[linux-2.6] / drivers / char / agp / amd64-agp.c
index c9f0f250d78ff774a0608d393222ec7c6ce689ba..13665db363d6df4025fe43c074f98c189d54a76c 100644 (file)
@@ -90,9 +90,9 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type)
                j++;
        }
 
-       if (mem->is_flushed == FALSE) {
+       if (!mem->is_flushed) {
                global_cache_flush();
-               mem->is_flushed = TRUE;
+               mem->is_flushed = true;
        }
 
        for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
@@ -268,7 +268,7 @@ static int __devinit aperture_valid(u64 aper, u32 size)
                printk(KERN_ERR PFX "Aperture too small (%d MB)\n", size>>20);
                return 0;
        }
-       if (aper + size > 0xffffffff) {
+       if ((u64)aper + size > 0x100000000ULL) {
                printk(KERN_ERR PFX "Aperture out of bounds\n");
                return 0;
        }
@@ -367,10 +367,8 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
 static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
 {
        char *revstring;
-       u8 rev_id;
 
-       pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
-       switch (rev_id) {
+       switch (pdev->revision) {
        case 0x01: revstring="A0"; break;
        case 0x02: revstring="A1"; break;
        case 0x11: revstring="B0"; break;
@@ -386,7 +384,7 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data
         * Work around errata.
         * Chips before B2 stepping incorrectly reporting v3.5
         */
-       if (rev_id < 0x13) {
+       if (pdev->revision < 0x13) {
                printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
                bridge->major_version = 3;
                bridge->minor_version = 0;
@@ -789,7 +787,7 @@ static void __exit agp_amd64_cleanup(void)
 
 /* On AMD64 the PCI driver needs to initialize this driver early
    for the IOMMU, so it has to be called via a backdoor. */
-#ifndef CONFIG_IOMMU
+#ifndef CONFIG_GART_IOMMU
 module_init(agp_amd64_init);
 module_exit(agp_amd64_cleanup);
 #endif