Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[pandora-kernel.git] / arch / powerpc / mm / pgtable_64.c
index c7f7bb6..7b278d8 100644 (file)
@@ -64,7 +64,8 @@
 #include <asm/iommu.h>
 #include <asm/abs_addr.h>
 #include <asm/vdso.h>
-#include <asm/imalloc.h>
+
+#include "mmu_decl.h"
 
 unsigned long ioremap_bot = IMALLOC_BASE;
 static unsigned long phbs_io_bot = PHBS_IO_BASE;
@@ -173,7 +174,7 @@ void __iomem * __ioremap(unsigned long addr, unsigned long size,
        pa = addr & PAGE_MASK;
        size = PAGE_ALIGN(addr + size) - pa;
 
-       if (size == 0)
+       if ((size == 0) || (pa == 0))
                return NULL;
 
        if (mem_init_done) {