From nobody Tue Jun 04 23:19:33 2024 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 4Vv64P5rlqz5MvRb; Tue, 04 Jun 2024 23:19:33 +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 4Vv64P4bRNz4Dqv; Tue, 4 Jun 2024 23:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717543173; 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=8aclMkdv4jJrckCkKKY9C2t6MO3QZQiCr01TPmP19Rs=; b=DWsHJg+cJKAu/G+HLeR3ISWyUFSJ6Acs71RX321YPe5P6Sn28DT617GAiweeFf8uTtqMif xnFjwqyf57Hhlm6R6dDUFLn6cyZmGGqAPu6TxnaZschI0rauT4/1sL8ObG55LcH9X0R+hR c8sqRN2KCvXMmvy/GT5xXBet8DQlpEWrGlA20o4OUHtGxj/PIYlCJdidiGed5bS4O/kibz 3+ohUogQLE9A1L6A5uC1NwsnQPoZOwnFUokKRkoSdCBlUzbj9zCADzyca/3TpInpxgVhJx V3WSCxPyuYoTcR6AJjvy6DLG3Qe79O04zl6oSkXNYH/9WJ68IM5JMXPkjwOQVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717543173; a=rsa-sha256; cv=none; b=Me9Z1IW9EWUWGgEPFXsbNEY7GH4nCKqNieyScYBo5w+9LGs4Cr6M35OW+NYxMe9PV6zHk+ ZAqDVNI6jy2wrIDGGBFqELNFvX/cCY3c24loBavGJc5fL+zzUQZ409kQXFp1XcFFQ+wiHk VGS2K+jvj6g2LKRLxn3QyNBTdB4a7ekqHRBP/Kr8M8C4qvI/OAZJcuuFaO3IF64BiQ0CSt ce6cEKj3nlRXth99EdGRbvzxeQs/j1cKUBl9bidAbTBxBtF+O/fpTeKIE+XmIXDOCVhFTR 888CQ1zHhstHzaWQJ0vfZ9A4qx2F6otzLKFX3EVCBdlhnUycoS7/N8q0ZDKLZg== 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=1717543173; 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=8aclMkdv4jJrckCkKKY9C2t6MO3QZQiCr01TPmP19Rs=; b=Js4hdR4z9Gbll7m+kCgYebExtpN3LFbVQLt3LFlSabtobY6b1xj7G1UPimD0c8nDEm4GRP agY/Nn0lw4BiSd8u/1PD0e4pntdQTkn4eckqE8hFnwE7d0JjnYNpRd0Go2cT9Vqze24CVz ARA+8LXqmORfv3NKNNFToIOdqaP9WOQ7E2PUEqOGweklNqaOU1Mdc9b7YCteR7lSOB71wW G0oj8XySqYsgfUDDaK8Q8vw4oFg2L6Cnb9TYH/xuloyTSXNqZlOgkRYOpqIit+EfEeu2bO stwcHqvoaMjAPahJFfGqp6p0fTS2PkxJJeV4ONM0Ns6LeWvaq+/0ovatyrvTdQ== 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 4Vv64P4ByYzds4; Tue, 4 Jun 2024 23:19:33 +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 454NJXvo096531; Tue, 4 Jun 2024 23:19:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 454NJXRj096528; Tue, 4 Jun 2024 23:19:33 GMT (envelope-from git) Date: Tue, 4 Jun 2024 23:19:33 GMT Message-Id: <202406042319.454NJXRj096528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 191e6a604938 - main - physmem: zero entire array 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 191e6a6049385a47db42595c32de63d7dd119ae5 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=191e6a6049385a47db42595c32de63d7dd119ae5 commit 191e6a6049385a47db42595c32de63d7dd119ae5 Author: Mitchell Horne AuthorDate: 2024-06-04 23:17:13 +0000 Commit: Mitchell Horne CommitDate: 2024-06-04 23:17:13 +0000 physmem: zero entire array As a convenience to callers, who might allocate the array on the stack. An empty/zero-valued range indicates the end of the physmap entries. Remove the now-redundant calls to bzero() at the call site. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45318 --- sys/arm64/arm64/pmap.c | 1 - sys/kern/subr_physmem.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index b6bc113ba8a4..03d0a1cc6676 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -1437,7 +1437,6 @@ pmap_bootstrap_san1(vm_offset_t va, int scale) * Rebuild physmap one more time, we may have excluded more regions from * allocation since pmap_bootstrap(). */ - bzero(physmap, sizeof(physmap)); physmap_idx = physmem_avail(physmap, nitems(physmap)); physmap_idx /= 2; diff --git a/sys/kern/subr_physmem.c b/sys/kern/subr_physmem.c index fda47d4ef697..a45c36aef2d7 100644 --- a/sys/kern/subr_physmem.c +++ b/sys/kern/subr_physmem.c @@ -189,6 +189,8 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, size_t maxavail, const struct region *exp, *hwp; uint64_t availsz; + bzero(avail, maxavail * sizeof(vm_paddr_t)); + totalmem = 0; availmem = 0; availsz = 0; @@ -587,7 +589,6 @@ ram_attach(device_t dev) rid = 0; /* Get the avail list. */ - bzero(avail_list, sizeof(avail_list)); regions_to_avail(avail_list, EXFLAG_NOALLOC | EXFLAG_NODUMP, PHYS_AVAIL_COUNT, 0, NULL, NULL);