git: f056e19abe20 - stable/13 - arm: Simplify get_cachetype_cp15()

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Thu, 21 Dec 2023 13:43:55 UTC
The branch stable/13 has been updated by olce:

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

commit f056e19abe20d14234e24d927a847ea6e2a90c42
Author:     Olivier Certner <olce.freebsd@certner.fr>
AuthorDate: 2023-10-13 12:22:14 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2023-12-21 13:39:43 +0000

    arm: Simplify get_cachetype_cp15()
    
    There's no point in setting 'arm_dcache_align_mask' before the
    function's end.
    
    Reviewed by:            markj, kib
    Sponsored by:           The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D42261
    
    (cherry picked from commit 1bce6f951a902f03bfb354f5b11473a0d12b3d7d)
    
    Approved by:    markj (mentor)
---
 sys/arm/arm/cpufunc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/arm/arm/cpufunc.c b/sys/arm/arm/cpufunc.c
index f2845eb80f3b..42f718b9773e 100644
--- a/sys/arm/arm/cpufunc.c
+++ b/sys/arm/arm/cpufunc.c
@@ -172,7 +172,6 @@ get_cachetype_cp15(void)
 				    : "=r" (csize));
 				arm_dcache_align = 1 <<
 				    (CPUV7_CT_xSIZE_LEN(csize) + 4);
-				arm_dcache_align_mask = arm_dcache_align - 1;
 			}
 			if (type == CACHE_ICACHE || type == CACHE_SEP_CACHE) {
 				sel = (i << 1) | 1;
@@ -195,10 +194,10 @@ get_cachetype_cp15(void)
 			if (dsize & CPU_CT_xSIZE_M)
 				arm_dcache_align = 0; /* not present */
 		}
-
-	out:
-		arm_dcache_align_mask = arm_dcache_align - 1;
 	}
+
+out:
+	arm_dcache_align_mask = arm_dcache_align - 1;
 }
 
 /*