powerpc/mm: Tweak PTE bit combination definitions
[deliverable/linux.git] / arch / powerpc / mm / fsl_booke_mmu.c
index 3d8cf01582f5615ac26e0fd92564e18cf96ca477..bb3d65998e6b514028d8c3af7b6c9c036047ba0d 100644 (file)
@@ -111,7 +111,7 @@ void settlbcam(int index, unsigned long virt, phys_addr_t phys,
        unsigned int tsize, lz;
 
        asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
-       tsize = (21 - lz) / 2;
+       tsize = 21 - lz;
 
 #ifdef CONFIG_SMP
        if ((flags & _PAGE_NO_CACHE) == 0)
@@ -162,7 +162,7 @@ unsigned long __init mmu_mapin_ram(void)
        phys_addr_t phys = memstart_addr;
 
        while (cam[tlbcam_index] && tlbcam_index < ARRAY_SIZE(cam)) {
-               settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], _PAGE_KERNEL, 0);
+               settlbcam(tlbcam_index, virt, phys, cam[tlbcam_index], PAGE_KERNEL_X, 0);
                virt += cam[tlbcam_index];
                phys += cam[tlbcam_index];
                tlbcam_index++;
@@ -218,7 +218,7 @@ adjust_total_lowmem(void)
                p += sprintf(p, "0/");
        p[-1] = '\0';
 
-       pr_info("Memory CAM mapping: %s Mb, residual: %ldMb\n", buf,
-               (total_lowmem - __max_low_memory) >> 20);
+       pr_info("Memory CAM mapping: %s Mb, residual: %dMb\n", buf,
+               (unsigned int)((total_lowmem - __max_low_memory) >> 20));
        __initial_memory_limit_addr = memstart_addr + __max_low_memory;
 }
This page took 0.023791 seconds and 5 git commands to generate.