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

Commit 68662f85 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman
Browse files

powerpc/64s/radix: prefetch user address in update_mmu_cache



Prefetch the faulting address in update_mmu_cache to give the page
table walker perhaps 100 cycles head start as locks are dropped and
the interrupt completed.

Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent f569bd94
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -509,8 +509,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
	 */
	 */
	unsigned long access, trap;
	unsigned long access, trap;


	if (radix_enabled())
	if (radix_enabled()) {
		prefetch((void *)address);
		return;
		return;
	}


	/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
	/* We only want HPTEs for linux PTEs that have _PAGE_ACCESSED set */
	if (!pte_young(*ptep) || address >= TASK_SIZE)
	if (!pte_young(*ptep) || address >= TASK_SIZE)
+2 −1
Original line number Original line Diff line number Diff line
@@ -152,7 +152,8 @@ pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
			  pmd_t *pmd)
			  pmd_t *pmd)
{
{
	return;
	if (radix_enabled())
		prefetch((void *)addr);
}
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */