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

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

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent bf680d51
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep) static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep)
{ {
real_pte_t rpte; real_pte_t rpte;
unsigned long *hidxp;
rpte.pte = pte; rpte.pte = pte;
rpte.hidx = 0; rpte.hidx = 0;
...@@ -70,7 +71,8 @@ static inline real_pte_t __real_pte(pte_t pte, pte_t *ptep) ...@@ -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 * check. The store side ordering is done in __hash_page_4K
*/ */
smp_rmb(); smp_rmb();
rpte.hidx = pte_val(*((ptep) + PTRS_PER_PTE)); hidxp = (unsigned long *)(ptep + PTRS_PER_PTE);
rpte.hidx = *hidxp;
} }
return rpte; return rpte;
} }
......
...@@ -218,7 +218,6 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, ...@@ -218,7 +218,6 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
* nobody is undating hidx. * nobody is undating hidx.
*/ */
hidxp = (unsigned long *)(ptep + PTRS_PER_PTE); hidxp = (unsigned long *)(ptep + PTRS_PER_PTE);
/* __real_pte use pte_val() any idea why ? FIXME!! */
rpte.hidx &= ~(0xfUL << (subpg_index << 2)); rpte.hidx &= ~(0xfUL << (subpg_index << 2));
*hidxp = rpte.hidx | (slot << (subpg_index << 2)); *hidxp = rpte.hidx | (slot << (subpg_index << 2));
new_pte = mark_subptegroup_valid(new_pte, subpg_index); new_pte = mark_subptegroup_valid(new_pte, subpg_index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment