diff options
| author | skrll <skrll@NetBSD.org> | 2021-10-31 07:56:55 +0000 |
|---|---|---|
| committer | skrll <skrll@NetBSD.org> | 2021-10-31 07:56:55 +0000 |
| commit | c2ef4a5a2c2d49e7abe058a136bbca8a79cf2c37 (patch) | |
| tree | 4c88cb3edb7a8cf14d6d0da0bc49de7852e79687 | |
| parent | e155c858de3505b12f83ff3490e604af81c4ea53 (diff) | |
Sprinkle some const
| -rw-r--r-- | sys/arch/aarch64/aarch64/cpufunc.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/sys/arch/aarch64/aarch64/cpufunc.c b/sys/arch/aarch64/aarch64/cpufunc.c index 30db2d96841..3d8ceccf602 100644 --- a/sys/arch/aarch64/aarch64/cpufunc.c +++ b/sys/arch/aarch64/aarch64/cpufunc.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.30 2021/10/23 06:48:31 skrll Exp $ */ +/* $NetBSD: cpufunc.c,v 1.31 2021/10/31 07:56:55 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org> @@ -30,7 +30,7 @@ #include "opt_multiprocessor.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.30 2021/10/23 06:48:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.31 2021/10/31 07:56:55 skrll Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -313,11 +313,10 @@ prt_cache(device_t self, struct aarch64_cache_info *cinfo, int level) void aarch64_printcacheinfo(device_t dev) { - struct aarch64_cache_info *cinfo; + struct cpu_info * const ci = curcpu(); + struct aarch64_cache_info * const cinfo = ci->ci_cacheinfo; int level; - cinfo = curcpu()->ci_cacheinfo; - for (level = 0; level < MAX_CACHE_LEVEL; level++) if (prt_cache(dev, cinfo, level) < 0) break; @@ -382,11 +381,10 @@ ln_dcache_inv_all(int level, struct aarch64_cache_unit *cunit) void aarch64_dcache_wbinv_all(void) { - struct aarch64_cache_info *cinfo; + struct cpu_info * const ci = curcpu(); + struct aarch64_cache_info * const cinfo = ci->ci_cacheinfo; int level; - cinfo = curcpu()->ci_cacheinfo; - for (level = 0; level < MAX_CACHE_LEVEL; level++) { if (cinfo[level].cacheable == CACHE_CACHEABLE_NONE) break; @@ -400,11 +398,10 @@ aarch64_dcache_wbinv_all(void) void aarch64_dcache_inv_all(void) { - struct aarch64_cache_info *cinfo; + struct cpu_info * const ci = curcpu(); + struct aarch64_cache_info * const cinfo = ci->ci_cacheinfo; int level; - cinfo = curcpu()->ci_cacheinfo; - for (level = 0; level < MAX_CACHE_LEVEL; level++) { if (cinfo[level].cacheable == CACHE_CACHEABLE_NONE) break; @@ -418,11 +415,10 @@ aarch64_dcache_inv_all(void) void aarch64_dcache_wb_all(void) { - struct aarch64_cache_info *cinfo; + struct cpu_info * const ci = curcpu(); + struct aarch64_cache_info * const cinfo = ci->ci_cacheinfo; int level; - cinfo = curcpu()->ci_cacheinfo; - for (level = 0; level < MAX_CACHE_LEVEL; level++) { if (cinfo[level].cacheable == CACHE_CACHEABLE_NONE) break; |
