Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 Do not attempt to change coherency_...
details: https://anonhg.NetBSD.org/src/rev/f1e779929a66
branches: trunk
changeset: 844936:f1e779929a66
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Sep 12 09:05:28 2019 +0000
description:
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.
diffstat:
sys/arch/aarch64/aarch64/cpufunc.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r c4e9de1c1763 -r f1e779929a66 sys/arch/aarch64/aarch64/cpufunc.c
--- a/sys/arch/aarch64/aarch64/cpufunc.c Thu Sep 12 09:02:36 2019 +0000
+++ b/sys/arch/aarch64/aarch64/cpufunc.c Thu Sep 12 09:05:28 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.5 2018/12/21 08:01:01 ryo Exp $ */
+/* $NetBSD: cpufunc.c,v 1.6 2019/09/12 09:05:28 jmcneill Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -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.6 2019/09/12 09:05:28 jmcneill Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -135,9 +137,12 @@
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
Home |
Main Index |
Thread Index |
Old Index