powerpc/mm: Use PAGE_FACTOR
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 12 Nov 2014 02:29:28 +0000 (13:29 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 12 Nov 2014 02:54:36 +0000 (13:54 +1100)
PAGE_FACTOR was defined to reflect the difference between configured
page size and fixed 4KB page size. Replace (PAGE_SHIFT - HW_PAGE_SHIFT)
with PAGE_FACTOR.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hash_low_64.S

index 057cbbb4c576d3377ca6f21b46d4b574114ef2be..5094f32b706e8b6ef16435c2a69d0ea3b2ff87bf 100644 (file)
@@ -514,7 +514,7 @@ htab_insert_pte:
        andis.  r0,r31,_PAGE_4K_PFN@h
        srdi    r5,r31,PTE_RPN_SHIFT
        bne-    htab_special_pfn
-       sldi    r5,r5,PAGE_SHIFT-HW_PAGE_SHIFT
+       sldi    r5,r5,PAGE_FACTOR
        add     r5,r5,r25
 htab_special_pfn:
        sldi    r5,r5,HW_PAGE_SHIFT
@@ -544,7 +544,7 @@ htab_call_hpte_insert1:
        andis.  r0,r31,_PAGE_4K_PFN@h
        srdi    r5,r31,PTE_RPN_SHIFT
        bne-    3f
-       sldi    r5,r5,PAGE_SHIFT-HW_PAGE_SHIFT
+       sldi    r5,r5,PAGE_FACTOR
        add     r5,r5,r25
 3:     sldi    r5,r5,HW_PAGE_SHIFT