From nobody Sat Nov 30 16:51:01 2024 X-Original-To: dev-commits-src-branches@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 4Y0wzV5DcSz5fJ0K; Sat, 30 Nov 2024 16:51:02 +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 4Y0wzV0XLNz4nPY; Sat, 30 Nov 2024 16:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985462; 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=ZVG1ETdBdqieQZanafKMkylgsMKw3Ssjx2TVq8at87E=; b=he+fPwslda+aES4vbNLvW/VRFv9T4pcnq1+tS42DJ5GLRmzpy6FOy0/u5H23LD+XaWb5JU aadbIJzJP8DLaeVz0dIMjA9ZrhhDeOSWJnhoLmk0pg92+JIr4EtOuC8ZYAfyyLkrnVy5j3 7MwF09zi5Fg45BaMN4vmoGY2YUfDAtRUbhUxrBHtZTIHgZkpxtCOMLtObaMx8pehGpEnjC UeUkGjLhjxG1uMXpNtrIrgqUSeUErEccrJxhlZNfx/lyMGinjDMh2/IQw8XxYP2ootwFxL +rWPYDorjMimGXEPAX0mE/hjrSYD8Yn9K6iQv0PrC21x81ZPZB2FjWHiw48VEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732985462; 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=ZVG1ETdBdqieQZanafKMkylgsMKw3Ssjx2TVq8at87E=; b=Y6Ksmu49d62Vy6UXqfwKkBbbg+biT7zTS4oJEZQTAQsbFq4JaBF1wCvtuLKjQCKwZidoig ugAVDPjqQ08mP+LOQ43TDlBzPZHJsDRfsSuiY1UTSDQiV5pON8AZLA3vhoBVq1tYrlJJo5 HM3tx9TtS7M8PJAxO2Ufcl3DsVG3q5x6+dS/5ytE6nEcJffk+CButsh6QhnFqi7dMguNvP 90/Z4w9puikiObbei7K8XLAOjT5rGujMnPi1glCTLfkoHyZPNBjoOINdHwhBXmQGcF3AoB z4EZL7zuKpYaXaZLDLjkDhsKP/tTQRrFGU7rvSU8Sb56IcjLwsUj/ouZuiZTnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732985462; a=rsa-sha256; cv=none; b=cL+ByvNWoPQTcEngsSZf5RUkjs6T4WrWz4ClINseMJQPcLOuA8TKmuVW4gS7l1AnNXjmAU zMke6Ciqqo3tXeX/rpnRwdLezLbonoSzmuK5LGgQ2vqa73jjInr3JfHkAQWOU2xw5FcMa8 hnl6o9CKO57ehwBuwXI9DD8Jn5e3mtNXPWehMsvj4igg8w2tRR9tvdONICa38AhKpnYHp9 UG8d2AjKJW1zSi/d/78gfydcEk7qjGc/s3nculBfft9NHHwv3TSYBsBHEUxxkaz+i7O4Om 7MktrlMfnBuZ7nEK5m97YTmWtZVAxwfipuAwzhBDeNYXDpZabYTp/zS3EQOd5A== 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 4Y0wzT6VNlzGT9; Sat, 30 Nov 2024 16:51:01 +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 4AUGp1QI042993; Sat, 30 Nov 2024 16:51:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AUGp1oc042990; Sat, 30 Nov 2024 16:51:01 GMT (envelope-from git) Date: Sat, 30 Nov 2024 16:51:01 GMT Message-Id: <202411301651.4AUGp1oc042990@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: 5ced86e1e211 - stable/14 - amd64: Use bool for booleans in getmemsize List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/14 X-Git-Reftype: branch X-Git-Commit: 5ced86e1e211e09cb4da40081bc5698a52ff08f7 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5ced86e1e211e09cb4da40081bc5698a52ff08f7 commit 5ced86e1e211e09cb4da40081bc5698a52ff08f7 Author: John Baldwin AuthorDate: 2024-02-02 22:58:46 +0000 Commit: John Baldwin CommitDate: 2024-11-30 13:55:56 +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 83a57ad3316f..ea0f164b2e56 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -984,10 +984,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. */ @@ -1002,7 +1003,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; @@ -1026,25 +1027,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. */ @@ -1054,7 +1055,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 @@ -1075,7 +1076,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 */