Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 506b863c authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman
Browse files

powerpc/mm: Remove pte_val usage for the second half of pgtable_t

parent bf680d51
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}
+0 −1
Original line number Diff line number Diff line
@@ -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);