From nobody Tue Jun 14 16:01:13 2022 X-Original-To: dev-commits-src-all@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 920CA831F0A; Tue, 14 Jun 2022 16:01:14 +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 4LMtTQ1zplz4vKP; Tue, 14 Jun 2022 16:01:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655222474; 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=Tnrh7SnQfepi+et/VruFxZwWsuBfhwtFFBmpFJ8On6A=; b=M1K7vssC2vUQAxR1EXJ8S46COEXm9/+a0948Z87F9NQ5a8VxVdazOQuWeRYFp+zfbp4N3Q puf4mYrY/ESWxv9jprE+p07vkfOrhkfTTspz+QC71Z/VYmZMErWxPisiOTl+aNLJwHRKhA Ya7AJ9raVZsZkJ8q0NC+6tiyNHsh8iz0+bXWylsUis7gXMsqBOVIsIhOguci9JKr4SsrME ZPH+WHUaa6HBgi4P9idKDWm/5leGEjTTX8IpsM9ET1RFt32dM4fOESZ0A/40ALjv50upA4 xuVryj0ChtSrV1c6rVrgK0nw/0Zf+bGYcf05yoTnMHLY4j3MQ5NgbmJmpXk2bQ== 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 011285655; Tue, 14 Jun 2022 16:01:14 +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 25EG1DKK082625; Tue, 14 Jun 2022 16:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25EG1DLs082624; Tue, 14 Jun 2022 16:01:13 GMT (envelope-from git) Date: Tue, 14 Jun 2022 16:01:13 GMT Message-Id: <202206141601.25EG1DLs082624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 630f633f2a76 - main - vm_object: Use the vm_object_(set|clear)_flag() helpers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 630f633f2a7618e7726ceb6ff4bff1c442919250 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655222474; 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=Tnrh7SnQfepi+et/VruFxZwWsuBfhwtFFBmpFJ8On6A=; b=PaZK1WSusjXY01hBUrIHODyACiCpuJKuJa22q41+EZZMlGre9SD6R3PC/CyzRpTL89SmAs DysQT2/o1KlKXPhgM6NBBDxYUIYXiqMFjEK1P0RsMt4FenxAmDqjeIBZQfNbeJSHWVJRmz xr6seg2+H4dv9BNydvCEnuIiMU4tQbr6ONq+cTEscbtc1AExtIIl6DQCmzcwrgbhTIjpPT cXWzNKVRcy323szNZkLofIKL2yFVJnRLfTNd+4LZRQ4+vXFixcUqdB6cyA4khb3HENttru EHPP1y5QUF9NXowd0i+SiBls49XxJu8l6KGx3nVjnJqlZrjqKGtbTJtX9UJvfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655222474; a=rsa-sha256; cv=none; b=tm/Drkz+ZddXpW+j+2tD5YDce62DMuHBYZUFHkdy1V7P0RSbqpKIOwtF3ivEW3TJ7O84LL GC1gGBjDt2fk5kSFZ//q99/MSk+enbgHNjXzcRTDBmjaBymv33zUiMR4KNOIN7w/KJ+QG4 2z5qXJzXKEdtDpiZL7q7RCspIhIz79Dsz4tI8DIm9qomF+QhLyhNpHE0MkdP22kWsPFYTh KfwsGs0Jg0/nXO74lNVzOC7WwXDwoYLT97h3dMQxMiEPPdq+oP6Fi08MUfmPAcQn9I9isy hWo2moIYCLQcVhOfxysHZkG9sI48+acTTp1MweODZGDDQhS+CXAlnfJIkMAiuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=630f633f2a7618e7726ceb6ff4bff1c442919250 commit 630f633f2a7618e7726ceb6ff4bff1c442919250 Author: Mark Johnston AuthorDate: 2022-06-14 15:35:20 +0000 Commit: Mark Johnston CommitDate: 2022-06-14 16:00:59 +0000 vm_object: Use the vm_object_(set|clear)_flag() helpers ... rather than setting and clearing flags inline. No functional change intended. Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35469 --- sys/kern/kern_umtx.c | 2 +- sys/vm/vm_object.c | 7 ++++--- sys/vm/vm_object.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 20e6b433efb2..c8307fb337c2 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4367,7 +4367,7 @@ umtx_shm_unref_reg(struct umtx_shm_reg *reg, bool force) if (force) { object = reg->ushm_obj->shm_object; VM_OBJECT_WLOCK(object); - object->flags |= OBJ_UMTXDEAD; + vm_object_set_flag(object, OBJ_UMTXDEAD); VM_OBJECT_WUNLOCK(object); } mtx_lock(&umtx_shm_lock); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 94f9bed3d9b8..efd646cf52e0 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -744,7 +744,7 @@ vm_object_backing_remove_locked(vm_object_t object) vm_object_sub_shadow(backing_object); if ((object->flags & OBJ_SHADOWLIST) != 0) { LIST_REMOVE(object, shadow_list); - object->flags &= ~OBJ_SHADOWLIST; + vm_object_clear_flag(object, OBJ_SHADOWLIST); } object->backing_object = NULL; } @@ -778,7 +778,7 @@ vm_object_backing_insert_locked(vm_object_t object, vm_object_t backing_object) VM_OBJECT_ASSERT_WLOCKED(backing_object); LIST_INSERT_HEAD(&backing_object->shadow_head, object, shadow_list); - object->flags |= OBJ_SHADOWLIST; + vm_object_set_flag(object, OBJ_SHADOWLIST); } object->backing_object = backing_object; } @@ -1498,7 +1498,8 @@ vm_object_shadow(vm_object_t *object, vm_ooffset_t *offset, vm_size_t length, vm_object_backing_insert(result, source); result->domain = source->domain; #if VM_NRESERVLEVEL > 0 - result->flags |= source->flags & OBJ_COLORED; + vm_object_set_flag(result, + (source->flags & OBJ_COLORED)); result->pg_color = (source->pg_color + OFF_TO_IDX(*offset)) & ((1 << (VM_NFREEORDER - 1)) - 1); diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index ef8245c266d5..80e84dcabf98 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -317,7 +317,7 @@ vm_object_color(vm_object_t object, u_short color) if ((object->flags & OBJ_COLORED) == 0) { object->pg_color = color; - object->flags |= OBJ_COLORED; + vm_object_set_flag(object, OBJ_COLORED); } }