]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/aperture_64.c
Start using the new '%pS' infrastructure to print symbols
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / aperture_64.c
index bf1b469d5847cc0097513464f2006f47e0ee6107..479926d9e0048d242023def47b3f596550a13344 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/pci.h>
 #include <linux/bitops.h>
 #include <linux/ioport.h>
+#include <linux/suspend.h>
 #include <asm/e820.h>
 #include <asm/io.h>
 #include <asm/gart.h>
 #include <asm/k8.h>
 
 int gart_iommu_aperture;
-int gart_iommu_aperture_disabled __initdata = 0;
-int gart_iommu_aperture_allowed __initdata = 0;
+int gart_iommu_aperture_disabled __initdata;
+int gart_iommu_aperture_allowed __initdata;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
-int fallback_aper_force __initdata = 0;
+int fallback_aper_force __initdata;
 
 int fix_aperture __initdata = 1;
 
@@ -76,6 +77,8 @@ static u32 __init allocate_aperture(void)
        printk(KERN_INFO "Mapping aperture over %d KB of RAM @ %lx\n",
                        aper_size >> 10, __pa(p));
        insert_aperture_resource((u32)__pa(p), aper_size);
+       register_nosave_region((u32)__pa(p) >> PAGE_SHIFT,
+                               (u32)__pa(p+aper_size) >> PAGE_SHIFT);
 
        return (u32)__pa(p);
 }
@@ -85,10 +88,6 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
        if (!aper_base)
                return 0;
 
-       if (aper_size < 64*1024*1024) {
-               printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
-               return 0;
-       }
        if (aper_base + aper_size > 0x100000000UL) {
                printk(KERN_ERR "Aperture beyond 4GB. Ignoring.\n");
                return 0;
@@ -97,6 +96,10 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
                printk(KERN_ERR "Aperture pointing to e820 RAM. Ignoring.\n");
                return 0;
        }
+       if (aper_size < 64*1024*1024) {
+               printk(KERN_ERR "Aperture too small (%d MB)\n", aper_size>>20);
+               return 0;
+       }
 
        return 1;
 }
@@ -312,6 +315,7 @@ void __init gart_iommu_hole_init(void)
        u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
        u64 aper_base, last_aper_base = 0;
        int fix, num, valid_agp = 0;
+       int node;
 
        if (gart_iommu_aperture_disabled || !fix_aperture ||
            !early_pci_allowed())
@@ -320,6 +324,7 @@ void __init gart_iommu_hole_init(void)
        printk(KERN_INFO  "Checking aperture...\n");
 
        fix = 0;
+       node = 0;
        for (num = 24; num < 32; num++) {
                if (!early_is_k8_nb(read_pci_config(0, num, 3, 0x00)))
                        continue;
@@ -332,8 +337,9 @@ void __init gart_iommu_hole_init(void)
                aper_base = read_pci_config(0, num, 3, 0x94) & 0x7fff;
                aper_base <<= 25;
 
-               printk(KERN_INFO "CPU %d: aperture @ %Lx size %u MB\n",
-                               num-24, aper_base, aper_size>>20);
+               printk(KERN_INFO "Node %d: aperture @ %Lx size %u MB\n",
+                               node, aper_base, aper_size >> 20);
+               node++;
 
                if (!aperture_valid(aper_base, aper_size)) {
                        fix = 1;