git: 0c7a1e66f137 - stable/14 - arm: Simplify get_cachetype_cp15()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Nov 2023 20:54:41 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=0c7a1e66f1376bf8ffb507a674396e4d221fe797
commit 0c7a1e66f1376bf8ffb507a674396e4d221fe797
Author: Olivier Certner <olce.freebsd@certner.fr>
AuthorDate: 2023-10-13 12:22:14 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-16 15:07:13 +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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42261
(cherry picked from commit 1bce6f951a902f03bfb354f5b11473a0d12b3d7d)
---
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;
}
/*