Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra
[pandora-kernel.git] / arch / arm / mm / init.c
index cddd684..b3b0f0f 100644 (file)
@@ -350,7 +350,7 @@ void __init bootmem_init(void)
         */
        arm_bootmem_free(min, max_low, max_high);
 
-       high_memory = __va((max_low << PAGE_SHIFT) - 1) + 1;
+       high_memory = __va(((phys_addr_t)max_low << PAGE_SHIFT) - 1) + 1;
 
        /*
         * This doesn't seem to be used by the Linux memory manager any
@@ -398,8 +398,8 @@ free_memmap(unsigned long start_pfn, unsigned long end_pfn)
         * Convert to physical addresses, and
         * round start upwards and end downwards.
         */
-       pg = PAGE_ALIGN(__pa(start_pg));
-       pgend = __pa(end_pg) & PAGE_MASK;
+       pg = (unsigned long)PAGE_ALIGN(__pa(start_pg));
+       pgend = (unsigned long)__pa(end_pg) & PAGE_MASK;
 
        /*
         * If there are free pages between these,