powerpc/mm: Remove pte_val usage for the second half of pgtable_t
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 1 Dec 2015 03:36:46 +0000 (09:06 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 14 Dec 2015 04:19:10 +0000 (15:19 +1100)
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/hash-64k.h
arch/powerpc/mm/hash64_64k.c

index a268416ca4a4972df5a10cdd35953b28452b3834..9fca7fae434bcdcad7f21883daebfa4e2c28da8b 100644 (file)
@@ -61,6 +61,7 @@
 static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep)
 {
        real_pte_t rpte;
+       unsigned long *hidxp;
 
        rpte.pte = pte;
        rpte.hidx = 0;
@@ -70,7 +71,8 @@ static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep)
                 * check. The store side ordering is done in __hash_page_4K
                 */
                smp_rmb();
-               rpte.hidx = pte_val(*((ptep) + PTRS_PER_PTE));
+               hidxp = (unsigned long *)(ptep + PTRS_PER_PTE);
+               rpte.hidx = *hidxp;
        }
        return rpte;
 }
index f1b86ba63430d185884f961fa8573b13ffc86623..8f7328075f04d5c42a2e207c9b4dc3d3282bf2c3 100644 (file)
@@ -218,7 +218,6 @@ repeat:
         * nobody is undating hidx.
         */
        hidxp = (unsigned long *)(ptep + PTRS_PER_PTE);
-       /* __real_pte use pte_val() any idea why ? FIXME!! */
        rpte.hidx &= ~(0xfUL << (subpg_index << 2));
        *hidxp = rpte.hidx  | (slot << (subpg_index << 2));
        new_pte = mark_subptegroup_valid(new_pte, subpg_index);