git: 3ff041945054 - main - Fix bracketing in the arm64 minidump code

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Wed, 24 Nov 2021 15:37:46 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=3ff041945054e692672f506a2448d1200133032d

commit 3ff041945054e692672f506a2448d1200133032d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2021-11-23 18:28:28 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2021-11-24 15:31:56 +0000

    Fix bracketing in the arm64 minidump code
    
    When building with gcc10 it suggests the parentheses are wrong. Set them
    to be the calculated physical address or'd with page table attributes.
    
    Reviewed by:    mhorne, imp
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D33099
---
 sys/arm64/arm64/minidump_machdep.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/arm64/arm64/minidump_machdep.c b/sys/arm64/arm64/minidump_machdep.c
index 8383d69fc5f8..ac5a7b271b85 100644
--- a/sys/arm64/arm64/minidump_machdep.c
+++ b/sys/arm64/arm64/minidump_machdep.c
@@ -303,8 +303,8 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
 
 			for (i = 0; i < Ln_ENTRIES; i++) {
 				for (j = 0; j < Ln_ENTRIES; j++) {
-					tmpbuffer[j] = pa + i * L2_SIZE +
-					    j * PAGE_SIZE | ATTR_DEFAULT |
+					tmpbuffer[j] = (pa + i * L2_SIZE +
+					    j * PAGE_SIZE) | ATTR_DEFAULT |
 					    L3_PAGE;
 				}
 				error = blk_write(di, (char *)&tmpbuffer, 0,
@@ -323,7 +323,7 @@ cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
 
 			/* Generate fake l3 entries based upon the l1 entry */
 			for (i = 0; i < Ln_ENTRIES; i++) {
-				tmpbuffer[i] = pa + (i * PAGE_SIZE) |
+				tmpbuffer[i] = (pa + i * PAGE_SIZE) |
 				    ATTR_DEFAULT | L3_PAGE;
 			}
 			error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE);