From nobody Sat Nov 30 16:51:28 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 4Y0x011Gdpz5fHsF; Sat, 30 Nov 2024 16:51:29 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y0x004dwGz4njx; Sat, 30 Nov 2024 16: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=1732985488; 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=kfOGCV4y/dvOzVkbPyrE/eCDZl6W8DbkiKCbwpkTVVo=; b=cEBpf3vBgLeDTWBH7LvmWhIYKF3Kx+Tb8qOELnvrrvSjc8TafUvgC004co8Ka4V7gX0fB2 +nUV9q5ozqmHlO/cVne/T6WPv4ezGHXPIOKKTcTSIcT2o+l9AEVoAhWZQkdI1lGOKhfFEG 2iNLDsB0Qvpe0fpmt/GTqM3UA9UARpP6qMKlMpHjlTYUjPGV+y9eYuopnrwl5DnIymKH0A /wJSJO8EFSj3EboORB0u/82uq5YWIfO/Q8lzau+05F+2aXJC5SDwfl4LSBbyDkPYkDVlF3 tF7KSJfp45AwtX/KIK1MhFcZMsf732lqBjUTfOyt1Y/xkQc3NEIaeGivteXd/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985488; 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=kfOGCV4y/dvOzVkbPyrE/eCDZl6W8DbkiKCbwpkTVVo=; b=a2Bqwtwyv21P3zdx5tpD30Yu8QIwDN/I5tX6FlQyO0JEwkqkR7xpmnMhz0VT5Ei7CDGdOg 9OhctpsYrlNAGkiYEhxOBhJAdfPa0yJhcQ2hgAX4KhZUTS6N3bS+YOlzXW/Xifxs3x6cy2 7J9XcWrrArYGCxYX8xOtAHjz972R+ChKxZkf+xbAWEahVzrkIcUSv9num20tVeRU1XKEab rzy1UGLZ4i8z/2tGMNFqVS7QRGicMOxxAn+d6KI+U05nZs9cCoFbBToMMEmRJVyJJ/xkx4 wWu4nuPpaNfApCGMbhY0FGAk5lRF6n4EIMD5Wqn2Zbo58nlmIU0iSw0gnGsWmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985488; a=rsa-sha256; cv=none; b=rFI4W9Xekx4hdMXijhX5BCZJKyVkAMMgni29xPlgBHcRAfN/cvjs6NJx3k46fXjLz8tiZ8 LPA2lSNQFXVagxoWLH1esgFMmmgfhZ+O0289vNZGMU3xOQNq3j46UUwqBXl0TeM9drKKDW DI/158A+F6bNS26rzbVEbz+r6FcVoq6QW2DP9mGnCCaGSRhLIH6s977TdI0uVqh6dCzinF XmXnkqiCEtuICBEcVRwndUcnhywSkO/kI1Vfm1VuUAgwVvLQOIOmCow/YBc8H9uOIzUWas DUg670UpM0WoDfkrEHOjt70OX84BNSQ2NdT33FlXynuykPoTuVLlABIZbxCmNQ== 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 4Y0x004GCgzGL0; Sat, 30 Nov 2024 16:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AUGpSP1046810; Sat, 30 Nov 2024 16:51:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGpSNl046807; Sat, 30 Nov 2024 16:51:28 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:28 GMT Message-Id: <202411301651.4AUGpSNl046807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c0dfdac8c8fa - stable/13 - amd64: Use bool for booleans in getmemsize 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0dfdac8c8fa41b4c9cb4c75d2a420140837399e Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c0dfdac8c8fa41b4c9cb4c75d2a420140837399e commit c0dfdac8c8fa41b4c9cb4c75d2a420140837399e Author: John Baldwin AuthorDate: 2024-02-02 22:58:46 +0000 Commit: John Baldwin CommitDate: 2024-11-29 19:11:53 +0000 amd64: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43693 (cherry picked from commit 70539d5da600a65d34c8d965ef2a9d475cbc9c4e) --- sys/amd64/amd64/machdep.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 928203a690ac..da25c09b9519 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -988,10 +988,11 @@ getmemsize(caddr_t kmdp, u_int64_t first) if (physmap[i + 1] < end) end = trunc_page(physmap[i + 1]); for (pa = round_page(physmap[i]); pa < end; pa += PAGE_SIZE) { - int tmp, page_bad, full; int *ptr = (int *)CADDR1; + int tmp; + bool full, page_bad; - full = FALSE; + full = false; /* * block out kernel memory as not available. */ @@ -1006,7 +1007,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) && pa < dcons_addr + dcons_size) goto do_dump_avail; - page_bad = FALSE; + page_bad = false; if (memtest == 0) goto skip_memtest; @@ -1030,25 +1031,25 @@ getmemsize(caddr_t kmdp, u_int64_t first) */ *(volatile int *)ptr = 0xaaaaaaaa; if (*(volatile int *)ptr != 0xaaaaaaaa) - page_bad = TRUE; + page_bad = true; /* * Test for alternating 0's and 1's */ *(volatile int *)ptr = 0x55555555; if (*(volatile int *)ptr != 0x55555555) - page_bad = TRUE; + page_bad = true; /* * Test for all 1's */ *(volatile int *)ptr = 0xffffffff; if (*(volatile int *)ptr != 0xffffffff) - page_bad = TRUE; + page_bad = true; /* * Test for all 0's */ *(volatile int *)ptr = 0x0; if (*(volatile int *)ptr != 0x0) - page_bad = TRUE; + page_bad = true; /* * Restore original value. */ @@ -1058,7 +1059,7 @@ skip_memtest: /* * Adjust array of valid/good pages. */ - if (page_bad == TRUE) + if (page_bad == true) continue; /* * If this good page is a continuation of the @@ -1079,7 +1080,7 @@ skip_memtest: printf( "Too many holes in the physical address space, giving up\n"); pa_indx--; - full = TRUE; + full = true; goto do_dump_avail; } phys_avail[pa_indx++] = pa; /* start */