Module Name: src
Committed By: martin
Date: Sun Sep 22 12:27:22 UTC 2019
Modified Files:
src/sys/arch/aarch64/aarch64 [netbsd-9]: cpufunc.c
Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #221):
sys/arch/aarch64/aarch64/cpufunc.c: revision 1.6
Do not attempt to change coherency_unit at runtime. Instead, if the
required coherency unit is greater than COHERENCY_UNIT in a MULTIPROCESSOR
kernel, just panic instead.
This makes non-MULTIPROCESSOR kernels work again.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 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.5 src/sys/arch/aarch64/aarch64/cpufunc.c:1.5.4.1
--- src/sys/arch/aarch64/aarch64/cpufunc.c:1.5 Fri Dec 21 08:01:01 2018
+++ src/sys/arch/aarch64/aarch64/cpufunc.c Sun Sep 22 12:27:22 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.5 2018/12/21 08:01:01 ryo Exp $ */
+/* $NetBSD: cpufunc.c,v 1.5.4.1 2019/09/22 12:27:22 martin Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <[email protected]>
@@ -26,8 +26,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "opt_multiprocessor.h"
+
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.5 2018/12/21 08:01:01 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.5.4.1 2019/09/22 12:27:22 martin Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -135,9 +137,12 @@ aarch64_getcacheinfo(void)
arm_dcache_align = sizeof(int) << arm_dcache_maxline;
arm_dcache_align_mask = arm_dcache_align - 1;
}
- /* update coherency_unit (in param.h) */
+
+#ifdef MULTIPROCESSOR
if (coherency_unit < arm_dcache_align)
- coherency_unit = arm_dcache_align;
+ panic("coherency_unit %ld < arm_dcache_align %d; increase COHERENCY_UNIT",
+ coherency_unit, arm_dcache_align);
+#endif
/*
* CLIDR - Cache Level ID Register