git: 030467548611 - main - vm_map: remove _GN suffix from MAP_ENTRY_STACK_GAP and MAP_CREATE_STACK_GAP symbols`

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 06 Dec 2024 08:00:19 UTC
The branch main has been updated by kib:

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

commit 0304675486114e3ab7da242c5a9c945dc584f6c2
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-12-04 04:12:25 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-12-06 07:46:55 +0000

    vm_map: remove _GN suffix from MAP_ENTRY_STACK_GAP and MAP_CREATE_STACK_GAP symbols`
    
    Reviewed by:    alc, dougm, markj
    Sponsored by:   The FreeBSD Foundation
    Differential revision:  https://reviews.freebsd.org/D47892
---
 sys/vm/vm_map.c | 30 +++++++++++++++---------------
 sys/vm/vm_map.h |  4 ++--
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index d48b2cb8b73f..3d0fa6da15bc 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1410,7 +1410,7 @@ vm_map_entry_link(vm_map_t map, vm_map_entry_t entry)
 		KASSERT(entry->end < root->end,
 		    ("%s: clip_start not within entry", __func__));
 		vm_map_splay_findprev(root, &llist);
-		if ((root->eflags & MAP_ENTRY_STACK_GAP_DN) == 0)
+		if ((root->eflags & MAP_ENTRY_STACK_GAP) == 0)
 			root->offset += entry->end - root->start;
 		root->start = entry->end;
 		max_free_left = vm_map_splay_merge_pred(header, entry, llist);
@@ -1427,7 +1427,7 @@ vm_map_entry_link(vm_map_t map, vm_map_entry_t entry)
 		KASSERT(entry->end == root->end,
 		    ("%s: clip_start not within entry", __func__));
 		vm_map_splay_findnext(root, &rlist);
-		if ((entry->eflags & MAP_ENTRY_STACK_GAP_DN) == 0)
+		if ((entry->eflags & MAP_ENTRY_STACK_GAP) == 0)
 			entry->offset += entry->start - root->start;
 		root->end = entry->start;
 		max_free_left = root->max_free = vm_size_max(
@@ -1462,7 +1462,7 @@ vm_map_entry_unlink(vm_map_t map, vm_map_entry_t entry,
 	vm_map_splay_findnext(root, &rlist);
 	if (op == UNLINK_MERGE_NEXT) {
 		rlist->start = root->start;
-		MPASS((rlist->eflags & MAP_ENTRY_STACK_GAP_DN) == 0);
+		MPASS((rlist->eflags & MAP_ENTRY_STACK_GAP) == 0);
 		rlist->offset = root->offset;
 	}
 	if (llist != header) {
@@ -1675,8 +1675,8 @@ vm_map_insert1(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
 		protoeflags |= MAP_ENTRY_VN_EXEC;
 	if ((cow & MAP_CREATE_GUARD) != 0)
 		protoeflags |= MAP_ENTRY_GUARD;
-	if ((cow & MAP_CREATE_STACK_GAP_DN) != 0)
-		protoeflags |= MAP_ENTRY_STACK_GAP_DN;
+	if ((cow & MAP_CREATE_STACK_GAP) != 0)
+		protoeflags |= MAP_ENTRY_STACK_GAP;
 	if (cow & MAP_INHERIT_SHARE)
 		inheritance = VM_INHERIT_SHARE;
 	else
@@ -2322,7 +2322,7 @@ vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset,
  */
 #define	MAP_ENTRY_NOMERGE_MASK	(MAP_ENTRY_GROWS_DOWN | \
     MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_IS_SUB_MAP | MAP_ENTRY_VN_EXEC | \
-    MAP_ENTRY_STACK_GAP_DN)
+    MAP_ENTRY_STACK_GAP)
 
 static bool
 vm_map_mergeable_neighbors(vm_map_entry_t prev, vm_map_entry_t entry)
@@ -2763,7 +2763,7 @@ vm_map_protect_guard(vm_map_entry_t entry, vm_prot_t new_prot,
 	vm_prot_t old_prot;
 
 	MPASS((entry->eflags & MAP_ENTRY_GUARD) != 0);
-	if ((entry->eflags & MAP_ENTRY_STACK_GAP_DN) == 0)
+	if ((entry->eflags & MAP_ENTRY_STACK_GAP) == 0)
 		return;
 
 	old_prot = PROT_EXTRACT(entry->offset);
@@ -2838,7 +2838,7 @@ again:
 		 * guard).
 		 */
 		while (!CONTAINS_BITS(first_entry->eflags,
-		    MAP_ENTRY_GUARD | MAP_ENTRY_STACK_GAP_DN) &&
+		    MAP_ENTRY_GUARD | MAP_ENTRY_STACK_GAP) &&
 		    first_entry != vm_map_entry_first(map))
 			first_entry = vm_map_entry_pred(first_entry);
 		start = first_entry->start;
@@ -2859,9 +2859,9 @@ again:
 			return (KERN_INVALID_ARGUMENT);
 		}
 		if ((entry->eflags & (MAP_ENTRY_GUARD |
-		    MAP_ENTRY_STACK_GAP_DN)) == MAP_ENTRY_GUARD)
+		    MAP_ENTRY_STACK_GAP)) == MAP_ENTRY_GUARD)
 			continue;
-		max_prot = (entry->eflags & MAP_ENTRY_STACK_GAP_DN) != 0 ?
+		max_prot = (entry->eflags & MAP_ENTRY_STACK_GAP) != 0 ?
 		    PROT_MAX_EXTRACT(entry->offset) : entry->max_protection;
 		if (!CONTAINS_BITS(max_prot, check_prot)) {
 			vm_map_unlock(map);
@@ -4645,12 +4645,12 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
 	if (gap_bot == gap_top)
 		return (KERN_SUCCESS);
 	rv = vm_map_insert1(map, NULL, 0, gap_bot, gap_top, VM_PROT_NONE,
-	    VM_PROT_NONE, MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN,
+	    VM_PROT_NONE, MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP,
 	    &gap_entry);
 	if (rv == KERN_SUCCESS) {
 		KASSERT((gap_entry->eflags & MAP_ENTRY_GUARD) != 0,
 		    ("entry %p not gap %#x", gap_entry, gap_entry->eflags));
-		KASSERT((gap_entry->eflags & MAP_ENTRY_STACK_GAP_DN) != 0,
+		KASSERT((gap_entry->eflags & MAP_ENTRY_STACK_GAP) != 0,
 		    ("entry %p not stack gap %#x", gap_entry,
 		    gap_entry->eflags));
 
@@ -4717,7 +4717,7 @@ retry:
 		return (KERN_FAILURE);
 	if ((gap_entry->eflags & MAP_ENTRY_GUARD) == 0)
 		return (KERN_SUCCESS);
-	if ((gap_entry->eflags & MAP_ENTRY_STACK_GAP_DN) != 0) {
+	if ((gap_entry->eflags & MAP_ENTRY_STACK_GAP) != 0) {
 		stack_entry = vm_map_entry_succ(gap_entry);
 		if ((stack_entry->eflags & MAP_ENTRY_GROWS_DOWN) == 0 ||
 		    stack_entry->start != gap_entry->end)
@@ -4840,7 +4840,7 @@ retry:
 		if (gap_deleted) {
 			rv1 = vm_map_insert1(map, NULL, 0, gap_start,
 			    gap_end, VM_PROT_NONE, VM_PROT_NONE,
-			    MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN,
+			    MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP,
 			    &gap_entry);
 			MPASS(rv1 == KERN_SUCCESS);
 			gap_entry->next_read = sgp;
@@ -5023,7 +5023,7 @@ RetryLookupLocked:
 		fault_typea &= ~VM_PROT_FAULT_LOOKUP;
 		if (prot == VM_PROT_NONE && map != kernel_map &&
 		    (entry->eflags & MAP_ENTRY_GUARD) != 0 &&
-		    (entry->eflags & MAP_ENTRY_STACK_GAP_DN) != 0 &&
+		    (entry->eflags & MAP_ENTRY_STACK_GAP) != 0 &&
 		    vm_map_growstack(map, vaddr, entry) == KERN_SUCCESS)
 			goto RetryLookupLocked;
 	}
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h
index cd30a4268efa..7c5981463ef7 100644
--- a/sys/vm/vm_map.h
+++ b/sys/vm/vm_map.h
@@ -145,7 +145,7 @@ struct vm_map_entry {
 #define	MAP_ENTRY_WRITECNT		0x00008000	/* tracked writeable
 							   mapping */
 #define	MAP_ENTRY_GUARD			0x00010000
-#define	MAP_ENTRY_STACK_GAP_DN		0x00020000
+#define	MAP_ENTRY_STACK_GAP		0x00020000
 #define	MAP_ENTRY_UNUSED1		0x00040000
 #define	MAP_ENTRY_HEADER		0x00080000
 
@@ -381,7 +381,7 @@ long vmspace_resident_count(struct vmspace *vmspace);
 #define	MAP_ACC_CHARGED		0x00004000
 #define	MAP_ACC_NO_CHARGE	0x00008000
 #define	MAP_COW_UNUSED1		0x00010000
-#define	MAP_CREATE_STACK_GAP_DN	0x00020000
+#define	MAP_CREATE_STACK_GAP	0x00020000
 #define	MAP_VN_EXEC		0x00040000
 #define	MAP_SPLIT_BOUNDARY_MASK	0x00180000
 #define	MAP_NO_HINT		0x00200000