git: 1bce6f951a90 - main - arm: Simplify get_cachetype_cp15()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Nov 2023 13:40:07 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=1bce6f951a902f03bfb354f5b11473a0d12b3d7d
commit 1bce6f951a902f03bfb354f5b11473a0d12b3d7d
Author: Olivier Certner <olce.freebsd@certner.fr>
AuthorDate: 2023-10-13 12:22:14 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-02 13:30:03 +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
---
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;
}
/*