Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm For armv7, CPU_CONTROL_UNAL_ENABLE is MBO/S...
details: https://anonhg.NetBSD.org/src/rev/ff0267a40baa
branches: trunk
changeset: 326262:ff0267a40baa
user: matt <matt%NetBSD.org@localhost>
date: Thu Jan 23 19:28:47 2014 +0000
description:
For armv7, CPU_CONTROL_UNAL_ENABLE is MBO/SBPO.
Make sure CPU_CONTROL_EX_BEND is set for big endian kernels.
Don't clear bits we aren't setting.
diffstat:
sys/arch/arm/arm/cpufunc.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r 022765f1a905 -r ff0267a40baa sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c Thu Jan 23 19:26:55 2014 +0000
+++ b/sys/arch/arm/arm/cpufunc.c Thu Jan 23 19:28:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.135 2014/01/21 19:05:10 christos Exp $ */
+/* $NetBSD: cpufunc.c,v 1.136 2014/01/23 19:28:47 matt Exp $ */
/*
* arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.135 2014/01/21 19:05:10 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.136 2014/01/23 19:28:47 matt Exp $");
#include "opt_compat_netbsd.h"
#include "opt_cpuoptions.h"
@@ -3051,7 +3051,12 @@
{
int cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_IC_ENABLE
- | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE ;
+ | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_BPRD_ENABLE
+#ifdef __ARMEB__
+ | CPU_CONTROL_EX_BEND
+#endif
+ | CPU_CONTROL_UNAL_ENABLE;
+
#if 0
int cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_SYST_ENABLE
| CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
@@ -3061,7 +3066,6 @@
#endif
#ifdef ARM32_DISABLE_ALIGNMENT_FAULTS
- cpuctrl |= CPU_CONTROL_UNAL_ENABLE;
#else
cpuctrl |= CPU_CONTROL_AFLT_ENABLE;
#endif
@@ -3078,7 +3082,7 @@
/* Set the control register */
curcpu()->ci_ctrl = cpuctrl;
- cpu_control(0xffffffff, cpuctrl);
+ cpu_control(cpuctrl, cpuctrl);
}
#endif /* CPU_CORTEX */
Home |
Main Index |
Thread Index |
Old Index