]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/agp/amd64-agp.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6-omap-h63xx.git] / drivers / char / agp / amd64-agp.c
index c9f0f250d78ff774a0608d393222ec7c6ce689ba..d8200ac8f8cbb8643355719aa78bd144eccee9ef 100644 (file)
@@ -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