Skip to content

Commit

Permalink
powerpc/mm: Remove pte_val usage for the second half of pgtable_t
Browse files Browse the repository at this point in the history
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Aneesh Kumar K.V authored and Michael Ellerman committed Dec 14, 2015
1 parent bf680d5 commit 506b863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/powerpc/include/asm/book3s/64/hash-64k.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/mm/hash64_64k.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
* 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);
Expand Down

0 comments on commit 506b863

Please sign in to comment.