git: dd18b62cec62 - main - riscv: better CTR messages in pmap_enter_l2()

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 06 Oct 2022 22:05:37 UTC
The branch main has been updated by mhorne:

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

commit dd18b62cec6228c17aef428a575f44152ea55d53
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2022-08-25 20:08:41 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-10-06 22:02:37 +0000

    riscv: better CTR messages in pmap_enter_l2()
    
    Disambiguate the failure cases.
    
    Reviewed by:    jhb
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D36562
---
 sys/riscv/riscv/pmap.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
index 1171b7fe9b17..aa9eb5255c82 100644
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -3172,8 +3172,8 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
 
 	if ((l2pg = pmap_alloc_l2(pmap, va, (flags & PMAP_ENTER_NOSLEEP) != 0 ?
 	    NULL : lockp)) == NULL) {
-		CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p",
-		    va, pmap);
+		CTR2(KTR_PMAP, "pmap_enter_l2: failed to allocate PT page"
+		    " for va %#lx in pmap %p", va, pmap);
 		return (KERN_RESOURCE_SHORTAGE);
 	}
 
@@ -3185,8 +3185,8 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
 		if ((flags & PMAP_ENTER_NOREPLACE) != 0) {
 			l2pg->ref_count--;
 			CTR2(KTR_PMAP,
-			    "pmap_enter_l2: failure for va %#lx in pmap %p",
-			    va, pmap);
+			    "pmap_enter_l2: failed to replace existing mapping"
+			    " for va %#lx in pmap %p", va, pmap);
 			return (KERN_FAILURE);
 		}
 		SLIST_INIT(&free);
@@ -3232,8 +3232,8 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags,
 				vm_page_free_pages_toq(&free, true);
 			}
 			CTR2(KTR_PMAP,
-			    "pmap_enter_l2: failure for va %#lx in pmap %p",
-			    va, pmap);
+			    "pmap_enter_l2: failed to create PV entry"
+			    " for va %#lx in pmap %p", va, pmap);
 			return (KERN_RESOURCE_SHORTAGE);
 		}
 		if ((new_l2 & PTE_W) != 0)