From nobody Wed Dec 29 17:17:48 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3C273192730F; Wed, 29 Dec 2021 17:17:49 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JPJ4r6xpkz4gZs; Wed, 29 Dec 2021 17:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE51C8DA; Wed, 29 Dec 2021 17:17:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BTHHmfo021776; Wed, 29 Dec 2021 17:17:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BTHHmS7021774; Wed, 29 Dec 2021 17:17:48 GMT (envelope-from git) Date: Wed, 29 Dec 2021 17:17:48 GMT Message-Id: <202112291717.1BTHHmS7021774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 8119cdd38b4f - main - vm_phys: hide vm_phys_set_pool List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8119cdd38b4f3ebdba92d8d0658fabbc04a1f238 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640798269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D98AWfLTb059UsGLJFsVkG/BLLVyqqz0nInII69N7r4=; b=s/lOkhd+vxE5oCG/dd4s/uMJ0CwwKa/aJvVPpRIyq+KQxbc3AZuYenxYUrJKixcqiwv+qo cIP4uau0XLRTIaWfvqBfvs4p4Xa6xxQ4TH4F5JD4Jsgn0mfVLDr67H3FxM2NvLZcXhIosK VvVK9YCk6csMaCLFi91/PO9D5VhozUd37vNviXpqEKDa6QA8NHy80bPDHSrllpwaJLmp0n Zl3m08Xq1uU/W3fRuqHDH1RRU4Uu9PgA6LQzmW4SxVR5MDk1pgzEQyWycqb5HCK9rQS/RK 9nVqg0HP+GxrlBh1KJVQkDEP+xYxB734R/th8M1ucJbB1XWL1S85ii8Bfm/vcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640798269; a=rsa-sha256; cv=none; b=BqCeo28/tpRTTay1uq7hy6tdwtzivwVM2hV0aJxgIPU0SgzYEcJnEiJXx/Wy6TXPcHdChR 7AEjBVMDShXhwDzvrcr9Hbd06r8OT5Qd0bmSAK0HELNsPGo+Ac0TwcPgl0flt6yHHHXQBb gI3NFMutqVfUL/YEB078O+uDxZZxbgiU1Nb7cyqCdARMEXamEJ9RLp8jEYLESpu+C8/PTQ CT3oooRV85Uqewwa0Zh+XyEXwChCvffv85wmDEE7I1iledJQAJZ11yAiIABlQK+K5xP8As VpZ7Oov/6ISS7XgQXwAfTakxH6iU9D2UGxPnIk9ia1JvoTh3ZqYJeecNYWrUfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=8119cdd38b4f3ebdba92d8d0658fabbc04a1f238 commit 8119cdd38b4f3ebdba92d8d0658fabbc04a1f238 Author: Doug Moore AuthorDate: 2021-12-29 17:10:31 +0000 Commit: Doug Moore CommitDate: 2021-12-29 17:17:33 +0000 vm_phys: hide vm_phys_set_pool It is only called in the file that defines it, so make it static and remove the declaration from the header. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D33688 --- sys/vm/vm_phys.c | 25 ++++++++++++------------- sys/vm/vm_phys.h | 1 - 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index b0aaa822211f..ad997581e77c 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -179,7 +179,6 @@ static void _vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int domain); static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end); static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl, int order, int tail); - /* * Red-black tree helpers for vm fictitious range management. */ @@ -711,6 +710,18 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail) } while (npages > 0); } +/* + * Set the pool for a contiguous, power of two-sized set of physical pages. + */ +static void +vm_phys_set_pool(int pool, vm_page_t m, int order) +{ + vm_page_t m_tmp; + + for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++) + m_tmp->pool = pool; +} + /* * Tries to allocate the specified number of pages from the specified pool * within the specified domain. Returns the actual number of allocated pages @@ -1273,18 +1284,6 @@ vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, return (NULL); } -/* - * Set the pool for a contiguous, power of two-sized set of physical pages. - */ -void -vm_phys_set_pool(int pool, vm_page_t m, int order) -{ - vm_page_t m_tmp; - - for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++) - m_tmp->pool = pool; -} - /* * Search for the given physical page "m" in the free lists. If the search * succeeds, remove "m" from the free lists and return TRUE. Otherwise, return diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index d10eb96f938f..86785fd7579d 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -79,7 +79,6 @@ void vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality); vm_page_t vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options); -void vm_phys_set_pool(int pool, vm_page_t m, int order); boolean_t vm_phys_unfree_page(vm_page_t m); int vm_phys_mem_affinity(int f, int t); void vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end);