Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Mar 2021 19:13:15 GMT
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 75e67b4920f2 - main - powerpc64: support superpages on pmap_mincore
Message-ID:  <202103301913.12UJDFYZ031692@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by luporl:

URL: https://cgit.FreeBSD.org/src/commit/?id=75e67b4920f2d70b98bd1383966d17d541b7c46c

commit 75e67b4920f2d70b98bd1383966d17d541b7c46c
Author:     Leandro Lupori <luporl@FreeBSD.org>
AuthorDate: 2021-03-30 18:54:01 +0000
Commit:     Leandro Lupori <luporl@FreeBSD.org>
CommitDate: 2021-03-30 18:54:01 +0000

    powerpc64: support superpages on pmap_mincore
    
    Now that superpages for HPT MMU has landed, finish implementation of
    pmap_mincore by adding support for superpages.
    
    Submitted by:           Fernando Eckhardt Valle <fernando.valle@eldorado.org.br>
    Reviewed by:            bdragon, luporl
    MFC after:              1 week
    Sponsored by:           Eldorado Research Institute (eldorado.org.br)
    Differential Revision:  https://reviews.freebsd.org/D29230
---
 sys/powerpc/aim/mmu_oea64.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index 1aa05501bd1b..0e9b15661758 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -1400,13 +1400,15 @@ moea64_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *pap)
 
 	PMAP_LOCK(pmap);
 
-	/* XXX Add support for superpages */
 	pvo = moea64_pvo_find_va(pmap, addr);
 	if (pvo != NULL) {
 		pa = PVO_PADDR(pvo);
 		m = PHYS_TO_VM_PAGE(pa);
 		managed = (pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED;
-		val = MINCORE_INCORE;
+		if (PVO_IS_SP(pvo))
+			val = MINCORE_INCORE | MINCORE_PSIND(1);
+		else
+			val = MINCORE_INCORE;
 	} else {
 		PMAP_UNLOCK(pmap);
 		return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103301913.12UJDFYZ031692>