Module Name: src Committed By: skrll Date: Sun Oct 31 07:56:55 UTC 2021
Modified Files: src/sys/arch/aarch64/aarch64: cpufunc.c Log Message: Sprinkle some const To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/aarch64/aarch64/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/aarch64/aarch64/cpufunc.c diff -u src/sys/arch/aarch64/aarch64/cpufunc.c:1.30 src/sys/arch/aarch64/aarch64/cpufunc.c:1.31 --- src/sys/arch/aarch64/aarch64/cpufunc.c:1.30 Sat Oct 23 06:48:31 2021 +++ src/sys/arch/aarch64/aarch64/cpufunc.c Sun Oct 31 07:56:55 2021 @@ -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 <r...@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_ 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 aarc 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;