From nobody Fri Feb 02 22:59:14 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 4TRWRk6LBSz58T4x; Fri, 2 Feb 2024 22:59: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 4TRWRk5TjSz454Z; Fri, 2 Feb 2024 22:59:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706914754; 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=36HdXQBGsskPGhk0sCKyNHnJDFy9UiNDYTMJ7Iy400g=; b=xN4c1OX2V1mo+HiNWmYv5yqW+uPa5+nCJeDKppxcKgf1IAYNw+RJBRGaDWQj4wQPAaEY+f EhVB5VFRDsOwYhNWoCxm136Hs62ckMjG2q1+Ol96z1iu7uxt7X8duDK75mxL007MpTlVt9 JM+MNBrs9Hl41liPKMqUx1dsgErbQohPe/0lKArSl35jbKchi75fWm1vhHhhfYVO0VUW/4 s7yN7CzWnIgHZe6WrHy7mn3Ds+m5uaeiEErDhrUyptsuaC/C9mUCWcV+BS5L8RrZatLcDy YJMbhEr5r4KITqMwy8BpX1YwRf1tKDc9fgnu3RjowtNHzyZXUOPx+CaR0QqQUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706914754; 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=36HdXQBGsskPGhk0sCKyNHnJDFy9UiNDYTMJ7Iy400g=; b=Yp4QiwovEylMnCxui8NblH5z48nIkIpUtSM/Q75tu0vqZaw7Cps0Z4qzAh3911IuWQ7U2p PLzmmFlvBuuVLnyZz0BAAnkvn6ERC/ifOvRYg/VCHZgjArwdqeZT3K3tpAYolUnAYulfYh FKXWvh5oU0pWUEvmYysiVOooW3z3ycQaFegKjiZj3YvRaiVIhN0T+EoesfIK1ZMAXGGyiy rW5u68+RFdR0F5zOPWM4QoMA8MbbOTMXK/wdoLWfW27f48OZWLcD7hqZ4qeE6YGVPFwDrk O2A91nj11N6DYP3OpcgJppUOYI9pGExkZ2MHG8fQjCjQNz7jXQtU6x6whrXvEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706914754; a=rsa-sha256; cv=none; b=GNCzKNBVYvwsUDy863QbNF9s4/x0tCz7IGqW4WTnWNv2WGjPaV/WH5re7WqXP/e9Cvjgar stNGeXuHT2ZYUYOUt3uE2Ux9QrqVgU4Zvghw+Ni3gS44iPFxEbGlLppcwFcr8rkvdv30PX V0/BWBhgZufDf+IZBmssvJlRzIaFtWg7xGGvWaISZkQe3+wzywP0dJFcf21nPrJRzs3Ncb bvk+N20hW6RSWDKVqOQ9ZAd3Q/dpzMdI1a6zTeUED8jvisuh374uyz8fcZ0pK9+Ff7On6U 9BmWwGT8VVDNUi1J7DegAAC+lNtZS/XAdiT56hueGGXB6J1wwCuh3jJ//VLNdw== 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 4TRWRk4V81zpZM; Fri, 2 Feb 2024 22:59:14 +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 412MxEWf042449; Fri, 2 Feb 2024 22:59:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 412MxEHs042446; Fri, 2 Feb 2024 22:59:14 GMT (envelope-from git) Date: Fri, 2 Feb 2024 22:59:14 GMT Message-Id: <202402022259.412MxEHs042446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 70539d5da600 - main - 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: 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70539d5da600a65d34c8d965ef2a9d475cbc9c4e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=70539d5da600a65d34c8d965ef2a9d475cbc9c4e commit 70539d5da600a65d34c8d965ef2a9d475cbc9c4e Author: John Baldwin AuthorDate: 2024-02-02 22:58:46 +0000 Commit: John Baldwin CommitDate: 2024-02-02 22:58:46 +0000 amd64: Use bool for booleans in getmemsize Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43693 --- 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 e237363f304b..b2120af8e856 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -982,10 +982,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. */ @@ -1000,7 +1001,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; @@ -1024,25 +1025,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. */ @@ -1052,7 +1053,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 @@ -1073,7 +1074,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 */