]> err.no Git - linux-2.6/blobdiff - arch/x86_64/kernel/aperture.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / arch / x86_64 / kernel / aperture.c
index b487396c4c5bc4e8e3310a9702e03ea5b4e88ed9..8f681cae7bf7df3c8a6749799d1d5b2f14682170 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/ioport.h>
 #include <asm/e820.h>
 #include <asm/io.h>
-#include <asm/proto.h>
+#include <asm/iommu.h>
 #include <asm/pci-direct.h>
 #include <asm/dma.h>
 #include <asm/k8.h>
@@ -51,7 +51,6 @@ static void __init insert_aperture_resource(u32 aper_base, u32 aper_size)
 
 static u32 __init allocate_aperture(void) 
 {
-       pg_data_t *nd0 = NODE_DATA(0);
        u32 aper_size;
        void *p; 
 
@@ -65,12 +64,12 @@ static u32 __init allocate_aperture(void)
         * Unfortunately we cannot move it up because that would make the
         * IOMMU useless.
         */
-       p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0); 
+       p = __alloc_bootmem_nopanic(aper_size, aper_size, 0);
        if (!p || __pa(p)+aper_size > 0xffffffff) {
                printk("Cannot allocate aperture memory hole (%p,%uK)\n",
                       p, aper_size>>10);
                if (p)
-                       free_bootmem_node(nd0, __pa(p), aper_size); 
+                       free_bootmem(__pa(p), aper_size);
                return 0;
        }
        printk("Mapping aperture over %d KB of RAM @ %lx\n",
@@ -87,7 +86,7 @@ static int __init aperture_valid(u64 aper_base, u32 aper_size)
                printk("Aperture too small (%d MB)\n", aper_size>>20);
                return 0;
        }
-       if (aper_base + aper_size >= 0xffffffff) { 
+       if (aper_base + aper_size > 0x100000000UL) {
                printk("Aperture beyond 4GB. Ignoring.\n");
                return 0; 
        }
@@ -215,7 +214,7 @@ void __init iommu_hole_init(void)
        if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
                return;
 
-       printk("Checking aperture...\n"); 
+       printk(KERN_INFO  "Checking aperture...\n");
 
        fix = 0;
        for (num = 24; num < 32; num++) {