Merge to Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0...
[linux-2.6.git] / drivers / char / agp / hp-agp.c
index c63b9d1..8c4c6ef 100644 (file)
@@ -14,8 +14,9 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/agp_backend.h>
-#include <acpi/acpixf.h>
+
 #include <asm/acpi-ext.h>
+
 #include "agp.h"
 
 #ifndef log2
@@ -84,8 +85,8 @@ static int __init hp_zx1_ioc_shared(void)
        /*
         * IOC already configured by sba_iommu module; just use
         * its setup.  We assume:
-        *      - IOVA space is 1Gb in size
-        *      - first 512Mb is IOMMU, second 512Mb is GART
+        *      - IOVA space is 1Gb in size
+        *      - first 512Mb is IOMMU, second 512Mb is GART
         */
        hp->io_tlb_ps = readq(hp->ioc_regs+HP_ZX1_TCNFG);
        switch (hp->io_tlb_ps) {
@@ -114,7 +115,7 @@ static int __init hp_zx1_ioc_shared(void)
 
        if (hp->gatt[0] != HP_ZX1_SBA_IOMMU_COOKIE) {
                /* Normal case when no AGP device in system */
-               hp->gatt = NULL;
+               hp->gatt = NULL;
                hp->gatt_entries = 0;
                printk(KERN_ERR PFX "No reserved IO PDIR entry found; "
                       "GART disabled\n");
@@ -251,7 +252,7 @@ hp_zx1_configure (void)
                readl(hp->ioc_regs+HP_ZX1_PDIR_BASE);
                writel(hp->io_tlb_ps, hp->ioc_regs+HP_ZX1_TCNFG);
                readl(hp->ioc_regs+HP_ZX1_TCNFG);
-               writel(~(HP_ZX1_IOVA_SIZE-1), hp->ioc_regs+HP_ZX1_IMASK);
+               writel((unsigned int)(~(HP_ZX1_IOVA_SIZE-1)), hp->ioc_regs+HP_ZX1_IMASK);
                readl(hp->ioc_regs+HP_ZX1_IMASK);
                writel(hp->iova_base|1, hp->ioc_regs+HP_ZX1_IBASE);
                readl(hp->ioc_regs+HP_ZX1_IBASE);