From nobody Fri Jul 14 06:51:28 2023 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 4R2MZm3r8Kz4lNMP; Fri, 14 Jul 2023 06:51:28 +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 4R2MZm29F0z3JKT; Fri, 14 Jul 2023 06:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689317488; 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=EIj4/ASd4TON5KdzyV4fvzSZ6VMONZBBT9oxWLzU62w=; b=tUP2riUzACEyx71URAsBmYlmcJMOl/Xl9E7xgP3MsDURcHqK/MftmD07I0BCifWZykI83o OwT9N+6XEUfCXfUS+PRbiy3u7VUBThV+lrpntxNt/Z9P7qF4l9E5AgfOu5oycpirc4vCEl ORb786NUCjKTMnqZt/8LhKRhSVvORowoqVs/ssNpW4VVGSVxGIJYTSEVvBetQIcd1hLl5B ngKx2QFdmeb3l9vF//fMyouy0EX4rUM3XAeq3KTIV6BAtULPzZmw1sFg0FirS4lOarrpvB NdbPhPKViuLZi3+kEm9w7cwhOwRiWwGDqcz8pkIm3EvEUy/qr2/Jvi8WaXplHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689317488; 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=EIj4/ASd4TON5KdzyV4fvzSZ6VMONZBBT9oxWLzU62w=; b=lblBc/TVyGb3BFz7XZFIgbRnMFciBI/tdVY4FswY0UlLI7CSr8f7FgUbjAXk1fK+bSArtr kgIWF99ul0oSAbiQ7xi81QRA+gIxwaU3ALWzXrAap6SzoWfS/QONWjZtRFtD7cvJLQzpoe 1+OsYklwVYuER9eIZsU1coIlizyr/si0xxLatwz/fyv7HVt+AOO9iYgeuxSzSE9yLNARIA Rp5MjL4N2yWh1QYUfb1DDfOEriqJvlqhaKrlV8IhosqrlB2QcMB/glRWsUdjWh47zOObWV c4K9uEn5xY3sEXo5Uj4C1T9/SM90Vm9X6d+Xe2cKxNcxLYf919Vogd6h+g4Gsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689317488; a=rsa-sha256; cv=none; b=jpiUBvDyWGUzgmPnS9Iv7EnD+TbgC/ORhpxeozDhMNRMU8xHXwdfsR1gETOwM39IZLt2SS E8xKSmpBe9IQ5P+yem8S92S6QH6OgpKsk7+ZKkdQMw5o/0lDeuPJlIHHl7SvNoMAUSIMDQ DVRvVTCSHop45287XyRFEOXEM2BY35Yx0C9twou+lIij8FGJ/tADFKIK6VgSBTVC8hMQLx fddJbIBJsHuuorbfQZwcQtgksNAQ90Mwlxl19mIcFz6wR0HBf70V1B/FeJfneWqm8OL4hD Wc1mB1FV4fQ1Zimwni5304uqRuxbhMrgXTtl6N9tokPUMJl+gnzh3qGRBnA4fw== 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 4R2MZm1FXLz1Ms6; Fri, 14 Jul 2023 06:51:28 +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 36E6pSFp044085; Fri, 14 Jul 2023 06:51:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36E6pSU8044084; Fri, 14 Jul 2023 06:51:28 GMT (envelope-from git) Date: Fri, 14 Jul 2023 06:51:28 GMT Message-Id: <202307140651.36E6pSU8044084@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: 3e04ae433fdc - main - vm_radix_init: use initializer 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e04ae433fdc4b47ff951667be15a360ca00ba8f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=3e04ae433fdc4b47ff951667be15a360ca00ba8f commit 3e04ae433fdc4b47ff951667be15a360ca00ba8f Author: Doug Moore AuthorDate: 2023-07-14 06:49:55 +0000 Commit: Doug Moore CommitDate: 2023-07-14 06:49:55 +0000 vm_radix_init: use initializer Several vm_radix tries are not initialized with vm_radix_init. That works, for now, since static initialization zeroes the root field anyway, but if initialization changes, these tries will fail. Add missing initializer calls. Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D40971 --- sys/amd64/amd64/pmap.c | 1 + sys/arm64/arm64/pmap.c | 1 + sys/i386/i386/pmap.c | 1 + sys/riscv/riscv/pmap.c | 1 + sys/vm/vm_object.c | 1 + 5 files changed, 5 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 896078f3c456..a4b8c6dc4c06 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1993,6 +1993,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_ucr3 = PMAP_NO_CR3; TAILQ_INIT(&kernel_pmap->pm_pvchunk); kernel_pmap->pm_stats.resident_count = res; + vm_radix_init(&kernel_pmap->pm_root); kernel_pmap->pm_flags = pmap_flags; /* diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 46520889728f..c2681104c961 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1291,6 +1291,7 @@ pmap_bootstrap(vm_paddr_t kernstart, vm_size_t kernlen) PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_l0_paddr = pmap_early_vtophys((vm_offset_t)kernel_pmap_store.pm_l0); + vm_radix_init(&kernel_pmap->pm_root); kernel_pmap->pm_cookie = COOKIE_FROM(-1, INT_MIN); kernel_pmap->pm_stage = PM_STAGE1; kernel_pmap->pm_levels = 4; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 077c4329ecaa..fc1afdb708be 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -659,6 +659,7 @@ __CONCAT(PMTYPE, bootstrap)(vm_paddr_t firstaddr) CPU_FILL(&kernel_pmap->pm_active); /* don't allow deactivation */ kernel_pmap->pm_stats.resident_count = res; TAILQ_INIT(&kernel_pmap->pm_pvchunk); + vm_radix_init(&kernel_pmap->pm_root); /* * Initialize the global pv list lock. diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index ac3565ce69b1..6cada93cdc91 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -646,6 +646,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) /* Set this early so we can use the pagetable walking functions */ kernel_pmap_store.pm_top = (pd_entry_t *)l1pt; PMAP_LOCK_INIT(kernel_pmap); + vm_radix_init(&kernel_pmap->pm_root); rw_init(&pvh_global_lock, "pmap pv global"); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index be81ad4942a4..3e9324da63ea 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -286,6 +286,7 @@ vm_object_init(void) mtx_init(&vm_object_list_mtx, "vm object_list", NULL, MTX_DEF); rw_init(&kernel_object->lock, "kernel vm object"); + vm_radix_init(&kernel_object->rtree); _vm_object_allocate(OBJT_PHYS, atop(VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS), OBJ_UNMANAGED, kernel_object, NULL); #if VM_NRESERVLEVEL > 0