From owner-svn-src-all@freebsd.org Tue Jun 16 22:53:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 984693382EA; Tue, 16 Jun 2020 22:53:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mk5c3PSQz3cpJ; Tue, 16 Jun 2020 22:53:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FF201684C; Tue, 16 Jun 2020 22:53:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05GMruNm046201; Tue, 16 Jun 2020 22:53:56 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05GMruKi046200; Tue, 16 Jun 2020 22:53:56 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006162253.05GMruKi046200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 16 Jun 2020 22:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362253 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 362253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2020 22:53:56 -0000 Author: cem Date: Tue Jun 16 22:53:56 2020 New Revision: 362253 URL: https://svnweb.freebsd.org/changeset/base/362253 Log: vm: Drop vm_map_clip_{start,end} macro wrappers No functional change. Reviewed by: dougm, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25282 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Jun 16 21:30:30 2020 (r362252) +++ head/sys/vm/vm_map.c Tue Jun 16 22:53:56 2020 (r362253) @@ -2377,24 +2377,17 @@ vm_map_entry_clone(vm_map_t map, vm_map_entry_t entry) * the specified address; if necessary, * it splits the entry into two. */ -#define vm_map_clip_start(map, entry, startaddr) \ -{ \ - if (startaddr > entry->start) \ - _vm_map_clip_start(map, entry, startaddr); \ -} - -/* - * This routine is called only when it is known that - * the entry must be split. - */ static inline void -_vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) +vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) { vm_map_entry_t new_entry; + if (start <= entry->start) + return; + VM_MAP_ASSERT_LOCKED(map); KASSERT(entry->end > start && entry->start < start, - ("_vm_map_clip_start: invalid clip of entry %p", entry)); + ("%s: invalid clip of entry %p", __func__, entry)); new_entry = vm_map_entry_clone(map, entry); @@ -2435,24 +2428,17 @@ vm_map_lookup_clip_start(vm_map_t map, vm_offset_t sta * the specified address; if necessary, * it splits the entry into two. */ -#define vm_map_clip_end(map, entry, endaddr) \ -{ \ - if ((endaddr) < (entry->end)) \ - _vm_map_clip_end((map), (entry), (endaddr)); \ -} - -/* - * This routine is called only when it is known that - * the entry must be split. - */ static inline void -_vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) +vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) { vm_map_entry_t new_entry; + if (end >= entry->end) + return; + VM_MAP_ASSERT_LOCKED(map); KASSERT(entry->start < end && entry->end > end, - ("_vm_map_clip_end: invalid clip of entry %p", entry)); + ("%s: invalid clip of entry %p", __func__, entry)); new_entry = vm_map_entry_clone(map, entry);