From nobody Tue Apr 09 14:24:59 2024 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 4VDSsR3cyGz5H5rd; Tue, 9 Apr 2024 14:24:59 +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 4VDSsR2zn7z47dS; Tue, 9 Apr 2024 14:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712672699; 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=bJFXh5tcrlxjT5t/jgYJhzN9HH0FThflALE62KsPehU=; b=ugRUjk2TWQJVTT9CCkJcxZvTiJ3vikVO7yYQZN6pt+1g8lTtb/wBPQKCXbf4pR/bVFQueR lNzw6DHpqXmWC8GYR0ZbCdNozoEiN//sOI7si+E1voM8p7UTYO+r4dYB+hefHHpdthnTs4 gZ6d5XAKJUPJb54J+VRZpXrQSBfKjxfOh4zfOpINKzgGJX3iK97ys++2w2CEGQ5jMujMOC WA4BTqDZnEpbyual13XDT8iJGVQGu6xO0kD9RJ5EI7BvRkkH3yLoDYYcuK8XRNzoQchtkL ZXDcwizjKDbP2x+jf6qUfL3haR6J5kJtCd4HtUk7I0s/3J2KFOe8dEQGxdYvmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712672699; a=rsa-sha256; cv=none; b=AxmCZiSX9WQaT9O8AifnujsfCqCGoOvvZMo+ZiQ0T8VsBS5zFm0eSn4k4MrnQB2Ivcdxta HJawGKvAVypCG/1X6nyvw4tSe+9vsWXrfVjUmhsaN0E7vLfP5sWgW1M1LivEqGrco+ZCi+ vEjJuiVYnYvhevuAKlW8PDHpjOdhO3oeP7SPC77d1giE14nmJcVXCE5RmB3Ruiod/1m9MS bKmKS9DaAV8eNi0JbS0sl4WjsJCe1tPNhv63+fcpEJp/kpvxdDM4Bzra0uA9r7KrVXQlyT wJbsxJ0NxJtoMQaj5lpdkJntpU82rfjjsfDkTSfqSTsQJXSt5czaFQsP89ou6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712672699; 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=bJFXh5tcrlxjT5t/jgYJhzN9HH0FThflALE62KsPehU=; b=HTg1yO9OHkP4YbTHmRxzWVUyTqz2KPfYIg8jQ+GShlDU/qLLUWp7cUhk1HjyCK5nNBashf a/iCO5wkwOH/o2k662AcqVbKjihpkEfiZvWt3RE3JpZ1Glozcp8CI5lhQ2HzBvlXdKYMWb MT2D3qGQ9OepLfh/ikZpSx7Ok0xEz1vHOYY7Yo9U5iJGbR3XH4R5DrXpd3zQkIVZelBUqz UubIAUNV4s4W7piMLDjpTtN4ezJxywukMJ/B0MRLjzD01P0Misimq0b+2BtHmNoq6iSPCn LOgisoh15s7kL86Tp2F31GZ/pH3ZgEWUxPRSiQosZ8N9OvDMWc7yM/9JVbPgsg== 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 4VDSsR2TDWzyFh; Tue, 9 Apr 2024 14:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 439EOxPo071481; Tue, 9 Apr 2024 14:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 439EOxav071478; Tue, 9 Apr 2024 14:24:59 GMT (envelope-from git) Date: Tue, 9 Apr 2024 14:24:59 GMT Message-Id: <202404091424.439EOxav071478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: cb20a74ca063 - main - vm: add macro to mark arguments used when NUMA is defined 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: dev-commits-src-main+owner@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: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb20a74ca06381e96c41cb4495d633710cc6cb79 Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=cb20a74ca06381e96c41cb4495d633710cc6cb79 commit cb20a74ca06381e96c41cb4495d633710cc6cb79 Author: Stephen J. Kiernan AuthorDate: 2024-04-03 21:05:24 +0000 Commit: Stephen J. Kiernan CommitDate: 2024-04-09 14:23:47 +0000 vm: add macro to mark arguments used when NUMA is defined This fixes compiler warnings when -Wunused-arguments is enabled and not quieted. Reviewed by: kib, markj Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44623 --- sys/vm/vm.h | 6 ++++++ sys/vm/vm_page.h | 2 +- sys/vm/vm_phys.c | 13 +++++-------- sys/vm/vm_phys.h | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/vm/vm.h b/sys/vm/vm.h index 499a504e3328..5fac6b3f2e78 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -154,6 +154,12 @@ struct kva_md_info { #define SWAP_RESERVE_RLIMIT_ON (1 << 1) #define SWAP_RESERVE_ALLOW_NONWIRED (1 << 2) +#ifdef NUMA +#define __numa_used +#else +#define __numa_used __unused +#endif + #ifdef _KERNEL struct ucred; diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 37cb1374b9f6..221f58b8fb04 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -1005,7 +1005,7 @@ vm_page_none_valid(vm_page_t m) } static inline int -vm_page_domain(vm_page_t m) +vm_page_domain(vm_page_t m __numa_used) { #ifdef NUMA int domn, segind; diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 8c15f107c2f9..66ad9c13dceb 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -226,7 +226,8 @@ vm_phys_fictitious_cmp(struct vm_phys_fictitious_seg *p1, } int -vm_phys_domain_match(int prefer, vm_paddr_t low, vm_paddr_t high) +vm_phys_domain_match(int prefer __numa_used, vm_paddr_t low __numa_used, + vm_paddr_t high __numa_used) { #ifdef NUMA domainset_t mask; @@ -330,7 +331,7 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS) * Return affinity, or -1 if there's no affinity information. */ int -vm_phys_mem_affinity(int f, int t) +vm_phys_mem_affinity(int f __numa_used, int t __numa_used) { #ifdef NUMA @@ -629,8 +630,8 @@ vm_phys_init(void) * Invoked by platform-dependent code prior to vm_phys_init(). */ void -vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, - int *locality) +vm_phys_register_domains(int ndomains __numa_used, + struct mem_affinity *affinity __numa_used, int *locality __numa_used) { #ifdef NUMA int i; @@ -651,10 +652,6 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, for (i = 0; i < vm_ndomains; i++) DOMAINSET_SET(i, &all_domains); -#else - (void)ndomains; - (void)affinity; - (void)locality; #endif } diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index f3a41785b1b5..1f502ad745c4 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -89,7 +89,7 @@ vm_paddr_t vm_phys_avail_size(int i); bool vm_phys_is_dumpable(vm_paddr_t pa); static inline int -vm_phys_domain(vm_paddr_t pa) +vm_phys_domain(vm_paddr_t pa __numa_used) { #ifdef NUMA int i;